Lines Matching refs:array

11 /* Prototype: mixed end ( array &$array );
12 Description: Advances internal pointer of array to last element, and returns its value.
15 $arrays = array (
16 array( 0 ),
19 array("a" => "A", 2 => "B", "C" => 3, 4 => 4, "one" => 1, "" => NULL ),
20 array(1, array(1, 2 => 3 ), "one" => 1, "5" => 5 ),
21 array(-1, -2, -3, -4, "-0.005" => "neg0.005", 2.0 => "float2", "neg.9" => -.9 ),
22 array(1.0005, 2.000000, -3.000000, -4.9999999 ),
23 array(true, false),
24 array("PHP", "Web2.0", "SOA"),
25 array(1, array() ),
26 array(1, 2, "" ),
27 array(" "),
28 array(2147483647, 2147483648, -2147483647, -2147483648 ),
29 array(0x7FFFFFFF, -0x80000000, 017777777777, -020000000000 ),
30 array(-.6700000E+3, -4.10003E+3, 1e-5, -1E+5, 000002.00 )
32 /* loop through $arrays to print the last element of each sub-array */
45 $test_array = array(1, array(1 => "one", "two" => 2, "" => "f") );
49 /* checking working of end() when array elements are deleted */
50 echo "\n*** Testing end() when array elements are deleted ***\n";
51 $array_test = array("a", "b", "d", 7, "u" => "U", -4, "-.008" => "neg.008");
53 // remove first element from array
54 echo "\n-- Remove first element from array --\n";
58 // remove last element from array, rewind and check end()
59 echo "\n-- Remove last element from array --\n";
66 echo "\n-- Remove any element from array apart from first and last element --\n";
90 $array_object = array();
104 //store resources in array
105 $resources = array($file_handle, $dir_handle);
112 var_dump( end($array[0], $array[0]) );
120 /* checking null array */
121 $null_array = array();
161 array(0) {
163 array(0) {
182 array(3) {
192 *** Testing end() when array elements are deleted ***
194 -- Remove first element from array --
197 -- Remove last element from array --
201 -- Remove any element from array apart from first and last element --
209 array(2) {
230 Warning: end() expects parameter 1 to be array, int given in %s on line %d
233 Warning: end() expects parameter 1 to be array, string given in %s on line %d