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 #21998 (array_pop() does not reset the current array position) --FILE-- <?php..
Decoded Output download
--TEST--
Bug #21998 (array_pop() does not reset the current array position)
--FILE--
<?php
$a = array("a", "b", "c");
var_dump(key($a));
var_dump(array_pop($a));
var_dump(key($a));
var_dump(array_pop($a));
var_dump(key($a));
var_dump(array_pop($a));
var_dump(key($a));
?>
--EXPECT--
int(0)
string(1) "c"
int(0)
string(1) "b"
int(0)
string(1) "a"
NULL
Did this file decode correctly?
Original Code
--TEST--
Bug #21998 (array_pop() does not reset the current array position)
--FILE--
<?php
$a = array("a", "b", "c");
var_dump(key($a));
var_dump(array_pop($a));
var_dump(key($a));
var_dump(array_pop($a));
var_dump(key($a));
var_dump(array_pop($a));
var_dump(key($a));
?>
--EXPECT--
int(0)
string(1) "c"
int(0)
string(1) "b"
int(0)
string(1) "a"
NULL
Function Calls
key | 1 |
Stats
MD5 | e664a2eee9e6f7cc52850280a600591c |
Eval Count | 0 |
Decode Time | 81 ms |