Revert "make hphpc able to use ini files"
[hiphop-php.git] / hphp / test / zend / bad / ext / standard / tests / array / array_shift_variation5.php
blob59a6462e22cd318fa7461e4d3423ae8d8f149b4e
1 <?php
2 /* Prototype : mixed array_shift(array &$stack)
3 * Description: Pops an element off the beginning of the array
4 * Source code: ext/standard/array.c
5 */
7 /*
8 * Use the result of one call to array_shift
9 * as the $stack argument of another call to array_shift()
10 * When done in one statement causes strict error messages.
13 echo "*** Testing array_shift() : usage variations ***\n";
15 $stack = array ( array ( array ('zero', 'one', 'two'), 'un', 'deux'), 'eins', 'zwei');
17 // not following strict standards
18 echo "\n-- Incorrect Method: --\n";
19 var_dump(array_shift(array_shift(array_shift($stack))));
21 $stack = array (array( array('zero', 'one', 'two'), 'un', 'deux'), 'eins', 'zwei');
22 // correct way of doing above:
23 echo "\n-- Correct Method: --\n";
24 $result1 = array_shift($stack);
25 $result2 = array_shift($result1);
26 var_dump(array_shift($result2));
28 echo "Done";