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 array_shift() function : usage variations - position of internal pointer --F..
Decoded Output download
*** Testing array_shift() : usage variations ***
-- Call array_shift() --
Did this file decode correctly?
Original Code
--TEST--
Test array_shift() function : usage variations - position of internal pointer
--FILE--
<?php
/*
* Test that the internal pointer is reset after calling array_shift()
*/
echo "*** Testing array_shift() : usage variations ***\n";
$stack = array ('one' => 'un', 'two' => 'deux');
echo "\n-- Call array_shift() --\n";
var_dump($result = array_shift($stack));
echo "\n-- Position of Internal Pointer in Passed Array: --\n";
echo key($stack) . " => " . current ($stack) . "\n";
echo "Done";
?>
--EXPECT--
*** Testing array_shift() : usage variations ***
-- Call array_shift() --
string(2) "un"
-- Position of Internal Pointer in Passed Array: --
two => deux
Done
Function Calls
array_shift | 1 |
Stats
MD5 | 9607f7ce40bb551b2e61c5d95df68102 |
Eval Count | 0 |
Decode Time | 116 ms |