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
8 * Pass different data types as $stack argument to array_shift() to test behaviour
11 echo "*** Testing array_shift() : usage variations ***\n";
13 //get an unset variable
20 public function __toString() {
21 return "Class A object";
30 // get a resource variable
31 $fp = fopen(__FILE__
, "r");
33 // unexpected values to be passed to $stack argument
72 /*22*/ @$undefined_var,
81 // loop through each element of $inputs to check the behavior of array_shift()
83 foreach($inputs as $input) {
84 echo "\n-- Iteration $iterator --\n";
85 var_dump( array_shift($input) );