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-- prev - ensure warning is received when passing an indirect temporary. --FILE-- <?..
Decoded Output download
-- Passing an indirect temporary variable --
Did this file decode correctly?
Original Code
--TEST--
prev - ensure warning is received when passing an indirect temporary.
--FILE--
<?php
/*
* Pass temporary variables to prev() to test behaviour
*/
function f() {
$array = array(1,2);
end($array);
return $array;
}
echo "\n-- Passing an indirect temporary variable --\n";
var_dump(prev(f()));
?>
--EXPECTF--
-- Passing an indirect temporary variable --
Notice: Only variables should be passed by reference in %s on line %d
int(1)
Function Calls
f | 1 |
end | 1 |
Stats
MD5 | c04effd07e9fec177e5d61e8c1860ca6 |
Eval Count | 0 |
Decode Time | 103 ms |