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-- Test current() function : internal pointer maintenance at the end of array --FILE..
Decoded Output download
--TEST--
Test current() function : internal pointer maintenance at the end of array
--FILE--
<?php
$array = ["foo" => 1, "bar" => 2, "baz" => 3];
reset($array);
while ($cur = current($array)) {
var_dump($cur);
next($array);
}
unset($array["baz"]);
$array[] = 4;
var_dump(current($array));
?>
--EXPECT--
int(1)
int(2)
int(3)
int(4)
Did this file decode correctly?
Original Code
--TEST--
Test current() function : internal pointer maintenance at the end of array
--FILE--
<?php
$array = ["foo" => 1, "bar" => 2, "baz" => 3];
reset($array);
while ($cur = current($array)) {
var_dump($cur);
next($array);
}
unset($array["baz"]);
$array[] = 4;
var_dump(current($array));
?>
--EXPECT--
int(1)
int(2)
int(3)
int(4)
Function Calls
None |
Stats
MD5 | c25d68e5790a04b46537ded43b0e7e8c |
Eval Count | 0 |
Decode Time | 79 ms |