2 /* Prototype : mixed reset(array $array_arg)
3 * Description: Set array argument's internal pointer to the first element and return it
4 * Source code: ext/standard/array.c
8 * Pass different data types as $array_arg argument to reset() to test behaviour
11 echo "*** Testing reset() : 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 $array_arg argument
73 /*23*/ @$undefined_var,
82 // loop through each element of $inputs to check the behavior of reset()
84 foreach($inputs as $input) {
85 echo "\n-- Iteration $iterator --\n";
86 var_dump( reset($input) );