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-- Bug #72598.2 (Reference is lost after array_slice()) --FILE-- <?php function ref(..
Decoded Output download
--TEST--
Bug #72598.2 (Reference is lost after array_slice())
--FILE--
<?php
function ref(&$ref) {
var_dump($ref);
$ref = 1;
}
new class {
function __construct() {
$b = 0;
$args = [&$b];
unset($b);
for ($i = 0; $i < 2; $i++) {
$a = array_slice($args, 0, 1);
call_user_func_array('ref', $a);
}
}
};
?>
--EXPECTF--
Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
int(0)
Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
int(0)
Did this file decode correctly?
Original Code
--TEST--
Bug #72598.2 (Reference is lost after array_slice())
--FILE--
<?php
function ref(&$ref) {
var_dump($ref);
$ref = 1;
}
new class {
function __construct() {
$b = 0;
$args = [&$b];
unset($b);
for ($i = 0; $i < 2; $i++) {
$a = array_slice($args, 0, 1);
call_user_func_array('ref', $a);
}
}
};
?>
--EXPECTF--
Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
int(0)
Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
int(0)
Function Calls
None |
Stats
MD5 | 11049011abbbd8e7f82880e1a696c1b3 |
Eval Count | 0 |
Decode Time | 182 ms |