Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Fix UMR in array_user_key_compare (MOPB24) --FILE-- <?php $arr = array("A" => 1, ..
Decoded Output download
--TEST--
Fix UMR in array_user_key_compare (MOPB24)
--FILE--
<?php
$arr = array("A" => 1, "B" => 1);
function array_compare(&$key1, &$key2)
{
$GLOBALS['a'] = &$key2;
unset($key2);
return 1;
}
uksort($arr, "array_compare");
var_dump($a);
?>
--EXPECTF--
Warning: array_compare(): Argument #1 ($key1) must be passed by reference, value given in %s on line %d
Warning: array_compare(): Argument #2 ($key2) must be passed by reference, value given in %s on line %d
string(1) "B"
Did this file decode correctly?
Original Code
--TEST--
Fix UMR in array_user_key_compare (MOPB24)
--FILE--
<?php
$arr = array("A" => 1, "B" => 1);
function array_compare(&$key1, &$key2)
{
$GLOBALS['a'] = &$key2;
unset($key2);
return 1;
}
uksort($arr, "array_compare");
var_dump($a);
?>
--EXPECTF--
Warning: array_compare(): Argument #1 ($key1) must be passed by reference, value given in %s on line %d
Warning: array_compare(): Argument #2 ($key2) must be passed by reference, value given in %s on line %d
string(1) "B"
Function Calls
uksort | 1 |
Stats
MD5 | 7325b68c7de928fc1cdfe4c0d643c6dc |
Eval Count | 0 |
Decode Time | 94 ms |