2 /* Prototype : mixed current(array $array_arg)
3 * Description: Return the element currently pointed to by the internal array pointer
4 * Source code: ext/standard/array.c
5 * Alias to functions: pos
9 * Pass different data types as $array_arg argument to current() to test behaviour
12 echo "*** Testing current() : usage variations ***\n";
14 //get an unset variable
22 public function __toString() {
23 return "Class A object";
32 // get a resource variable
33 $fp = fopen(__FILE__
, "r");
35 // unexpected values to be passed to $array_arg argument
74 /*22*/ @$undefined_var,
83 // loop through each element of $inputs to check the behavior of current()
85 foreach($inputs as $input) {
86 echo "\n-- Iteration $iterator --\n";
87 var_dump( current($input) );