2 /* Prototype : mixed end(array $array_arg)
3 * Description: Advances array argument's internal pointer to the last element and return it
4 * Source code: ext/standard/array.c
8 * Pass different data types as $array_arg to test behaviour of end()
11 echo "*** Testing end() : usage variations ***\n";
13 //get an unset variable
20 var $foo = 'hello, world';
21 public function __toString() {
22 return "Class A object";
31 // get a resource variable
32 $fp = fopen(__FILE__
, "r");
34 // unexpected values to be passed to $array_arg argument
74 /*23*/ @$undefined_var,
83 // loop through each element of $inputs to check the behavior of end()
85 foreach($inputs as $input) {
86 echo "\n-- Iteration $iterator --\n";
87 var_dump( end($input) );