]> granicus.if.org Git - php/blob
7b74761586
[php] /
1 --TEST--
2 Test var_dump() function
3 --SKIPIF--
4 <?php
5 if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
6 ?>
7 --INI--
8 precision=14
9 --FILE--
10 <?php
11 /* Prototype: void var_dump ( mixed $expression [, mixed $expression [, $...]] );
12    Description: Displays structured information about one or more expressions that includes its type and value.
13 */
14
15 /* Prototype: void check_vardump( $variables );
16    Description: use var_dump() to display the variables */
17 function check_vardump( $variables ) {
18   $counter = 1;
19   foreach( $variables as $variable ) {
20     echo "-- Iteration $counter --\n";
21     var_dump($variable);
22     $counter++;
23   }
24 }
25
26 echo "\n*** Testing var_dump() on integer variables ***\n";
27 $integers = array (
28   0,  // zero as argument
29   000000123,  //octal value of 83
30   123000000,
31   -00000123,  //octal value of 83
32   -12300000,
33   range(1,10),  // positive values
34   range(-1,-10),  // negative values
35   +2147483647,  // max positive integer
36   +2147483648,  // max positive integer + 1
37   -2147483648,  // min range of integer
38   -2147483647,  // min range of integer + 1
39   0x7FFFFFFF,  // max positive hexadecimal integer
40   -0x80000000,  // min range of hexadecimal integer
41   017777777777,  // max posotive octal integer
42   -020000000000  // min range of octal integer
43 );
44 /* calling check_vardump() to display contents of integer variables
45    using var_dump() */
46 check_vardump($integers);
47
48 echo "\n*** Testing var_dump() on float variables ***\n";
49 $floats = array (
50   -0.0,
51   +0.0,
52   1.234,
53   -1.234,
54   -2.000000,
55   000002.00,
56   -.5,
57   .567,
58   -.6700000e-3,
59   -.6700000E+3,
60   .6700000E+3,
61   .6700000e+3,
62   -4.10003e-3,
63   -4.10003E+3,
64   4.100003e-3,
65   4.100003E+3,
66   1e5,
67   -1e5,
68   1e-5,
69   -1e-5,
70   1e+5,
71   -1e+5,
72   1E5,
73   -1E5,
74   1E+5,
75   -1E+5,
76   1E-5,
77   -1E-5,
78   -0x80000001,  // float value, beyond max negative int
79   0x80000001,  // float value, beyond max positive int
80   020000000001,  // float value, beyond max positive int
81   -020000000001  // float value, beyond max negative int
82 );
83 /* calling check_vardump() to display contents of float variables
84    using var_dump() */
85 check_vardump($floats);
86
87 echo "\n*** Testing var_dump() on string variables ***\n";
88 $strings = array (
89   "",
90   '',
91   " ",
92   ' ',
93   "0",
94   "\0",
95   '\0',
96   "\t",
97   '\t',
98   "PHP",
99   'PHP',
100   "abcd\x0n1234\x0005678\x0000efgh\xijkl",  // strings with hexadecimal NULL
101   "abcd\0efgh\0ijkl\x00mnop\x000qrst\00uvwx\0000yz",  // strings with octal NULL
102   "1234\t\n5678\n\t9100\"abcda"  // strings with escape characters
103 );
104 /* calling check_vardump() to display contents of strings
105    using var_dump() */
106 check_vardump($strings);
107
108 echo "\n*** Testing var_dump() on boolean variables ***\n";
109 $booleans = array (
110   TRUE,
111   FALSE,
112   true,
113   false
114 );
115 /* calling check_vardump() to display boolean variables
116    using var_dump() */
117 check_vardump($booleans);
118
119 echo "\n*** Testing var_dump() on array variables ***\n";
120 $arrays = array (
121   array(),
122   array(NULL),
123   array(null),
124   array(true),
125   array(""),
126   array(''),
127   array(array(), array()),
128   array(array(1, 2), array('a', 'b')),
129   array(1 => 'One'),
130   array("test" => "is_array"),
131   array(0),
132   array(-1),
133   array(10.5, 5.6),
134   array("string", "test"),
135   array('string', 'test'),
136 );
137 /* calling check_vardump() to display contents of an array
138    using var_dump() */
139 check_vardump($arrays);
140
141 echo "\n*** Testing var_dump() on object variables ***\n";
142 class object_class
143 {
144   var       $value;
145   public    $public_var1 = 10;
146   private   $private_var1 = 20;
147   private   $private_var2;
148   protected $protected_var1 = "string_1";
149   protected $protected_var2;
150
151   function __construct ( ) {
152     $this->value = 50;
153     $this->public_var2 = 11;
154     $this->private_var2 = 21;
155     $this->protected_var2 = "string_2";
156   }
157
158   public function foo1() {
159     echo "foo1() is called\n";
160   }
161   protected function foo2() {
162     echo "foo2() is called\n";
163   }
164   private function foo3() {
165     echo "foo3() is called\n";
166   }
167 }
168 /* class with no member */
169 class no_member_class {
170  // no members
171 }
172
173 /* class with member as object of other class */
174 class contains_object_class
175 {
176    var       $p = 30;
177    var       $class_object1;
178    public    $class_object2;
179    private   $class_object3;
180    protected $class_object4;
181    var       $no_member_class_object;
182
183    public function func() {
184      echo "func() is called \n";
185    }
186
187    function __construct () {
188      $this->class_object1 = new object_class();
189      $this->class_object2 = new object_class();
190      $this->class_object3 = $this->class_object1;
191      $this->class_object4 = $this->class_object2;
192      $this->no_member_class_object = new no_member_class();
193      $this->class_object5 = $this;   //recursive reference
194    }
195 }
196
197 /* objects of different classes */
198 $obj = new contains_object_class;
199 $temp_class_obj = new object_class();
200
201 /* object which is unset */
202 $unset_obj = new object_class();
203 unset($unset_obj);
204
205 $objects = array (
206   new object_class,
207   new no_member_class,
208   new contains_object_class,
209   $obj,
210   $obj->class_object1,
211   $obj->class_object2,
212   $obj->no_member_class_object,
213   $temp_class_obj,
214   @$unset_obj
215 );
216 /* calling check_vardump() to display contents of the objects
217    using var_dump() */
218 check_vardump($objects);
219
220 echo "\n** Testing var_dump() on objects having circular reference **\n";
221 $recursion_obj1 = new object_class();
222 $recursion_obj2 = new object_class();
223 $recursion_obj1->obj = &$recursion_obj2;  //circular reference
224 $recursion_obj2->obj = &$recursion_obj1;  //circular reference
225 var_dump($recursion_obj2);
226
227 echo "\n*** Testing var_dump() on resources ***\n";
228 /* file type resource */
229 $file_handle = fopen(__FILE__, "r");
230
231 /* directory type resource */
232 $dir_handle = opendir( __DIR__ );
233
234 $resources = array (
235   $file_handle,
236   $dir_handle
237 );
238 /* calling check_vardump() to display the resource content type
239    using var_dump() */
240 check_vardump($resources);
241
242 echo "\n*** Testing var_dump() on different combinations of scalar
243     and non-scalar variables ***\n";
244 /* a variable which is unset */
245 $unset_var = 10.5;
246 unset($unset_var);
247
248 /* unset file type resource */
249 unset($file_handle);
250
251 $variations = array (
252   array( 123, -1.2345, "a" ),
253   array( "d", array(1, 3, 5), true, null),
254   array( new no_member_class, array(), false, 0 ),
255   array( -0.00, "Where am I?", array(7,8,9), TRUE, 'A', 987654321 ),
256   array( @$unset_var, 2.E+10, 100-20.9, 000004.599998 ),  //unusual data
257   array( "array(1,2,3,4)1.0000002TRUE", @$file_handle, 111333.00+45e5, '/00\7')
258 );
259 /* calling check_vardump() to display combinations of scalar and
260    non-scalar variables using var_dump() */
261 check_vardump($variations);
262
263 echo "\n*** Testing var_dump() on miscellaneous input arguments ***\n";
264 $misc_values = array (
265   @$unset_var,
266   NULL,  // NULL argument
267   @$undef_variable,  //undefined variable
268   null
269 );
270 /* calling check_vardump() to display miscellaneous data using var_dump() */
271 check_vardump($misc_values);
272
273 echo "\n*** Testing var_dump() on multiple arguments ***\n";
274 var_dump( $integers, $floats, $strings, $arrays, $booleans, $resources,
275           $objects, $misc_values, $variations );
276
277 /* closing resource handle used */
278 closedir($dir_handle);
279
280 echo "Done\n";
281 ?>
282 --EXPECT--
283 *** Testing var_dump() on integer variables ***
284 -- Iteration 1 --
285 int(0)
286 -- Iteration 2 --
287 int(83)
288 -- Iteration 3 --
289 int(123000000)
290 -- Iteration 4 --
291 int(-83)
292 -- Iteration 5 --
293 int(-12300000)
294 -- Iteration 6 --
295 array(10) {
296   [0]=>
297   int(1)
298   [1]=>
299   int(2)
300   [2]=>
301   int(3)
302   [3]=>
303   int(4)
304   [4]=>
305   int(5)
306   [5]=>
307   int(6)
308   [6]=>
309   int(7)
310   [7]=>
311   int(8)
312   [8]=>
313   int(9)
314   [9]=>
315   int(10)
316 }
317 -- Iteration 7 --
318 array(10) {
319   [0]=>
320   int(-1)
321   [1]=>
322   int(-2)
323   [2]=>
324   int(-3)
325   [3]=>
326   int(-4)
327   [4]=>
328   int(-5)
329   [5]=>
330   int(-6)
331   [6]=>
332   int(-7)
333   [7]=>
334   int(-8)
335   [8]=>
336   int(-9)
337   [9]=>
338   int(-10)
339 }
340 -- Iteration 8 --
341 int(2147483647)
342 -- Iteration 9 --
343 int(2147483648)
344 -- Iteration 10 --
345 int(-2147483648)
346 -- Iteration 11 --
347 int(-2147483647)
348 -- Iteration 12 --
349 int(2147483647)
350 -- Iteration 13 --
351 int(-2147483648)
352 -- Iteration 14 --
353 int(2147483647)
354 -- Iteration 15 --
355 int(-2147483648)
356
357 *** Testing var_dump() on float variables ***
358 -- Iteration 1 --
359 float(-0)
360 -- Iteration 2 --
361 float(0)
362 -- Iteration 3 --
363 float(1.234)
364 -- Iteration 4 --
365 float(-1.234)
366 -- Iteration 5 --
367 float(-2)
368 -- Iteration 6 --
369 float(2)
370 -- Iteration 7 --
371 float(-0.5)
372 -- Iteration 8 --
373 float(0.567)
374 -- Iteration 9 --
375 float(-0.00067)
376 -- Iteration 10 --
377 float(-670)
378 -- Iteration 11 --
379 float(670)
380 -- Iteration 12 --
381 float(670)
382 -- Iteration 13 --
383 float(-0.00410003)
384 -- Iteration 14 --
385 float(-4100.03)
386 -- Iteration 15 --
387 float(0.004100003)
388 -- Iteration 16 --
389 float(4100.003)
390 -- Iteration 17 --
391 float(100000)
392 -- Iteration 18 --
393 float(-100000)
394 -- Iteration 19 --
395 float(1.0E-5)
396 -- Iteration 20 --
397 float(-1.0E-5)
398 -- Iteration 21 --
399 float(100000)
400 -- Iteration 22 --
401 float(-100000)
402 -- Iteration 23 --
403 float(100000)
404 -- Iteration 24 --
405 float(-100000)
406 -- Iteration 25 --
407 float(100000)
408 -- Iteration 26 --
409 float(-100000)
410 -- Iteration 27 --
411 float(1.0E-5)
412 -- Iteration 28 --
413 float(-1.0E-5)
414 -- Iteration 29 --
415 int(-2147483649)
416 -- Iteration 30 --
417 int(2147483649)
418 -- Iteration 31 --
419 int(2147483649)
420 -- Iteration 32 --
421 int(-2147483649)
422
423 *** Testing var_dump() on string variables ***
424 -- Iteration 1 --
425 string(0) ""
426 -- Iteration 2 --
427 string(0) ""
428 -- Iteration 3 --
429 string(1) " "
430 -- Iteration 4 --
431 string(1) " "
432 -- Iteration 5 --
433 string(1) "0"
434 -- Iteration 6 --
435 string(1) "\0"
436 -- Iteration 7 --
437 string(2) "\0"
438 -- Iteration 8 --
439 string(1) "     "
440 -- Iteration 9 --
441 string(2) "\t"
442 -- Iteration 10 --
443 string(3) "PHP"
444 -- Iteration 11 --
445 string(3) "PHP"
446 -- Iteration 12 --
447 string(29) "abcd\0n1234\005678\000efgh\xijkl"
448 -- Iteration 13 --
449 string(34) "abcd\0efgh\0ijkl\0mnop\00qrst\0uvwx\00yz"
450 -- Iteration 14 --
451 string(22) "1234        
452 5678
453         9100"abcda"
454
455 *** Testing var_dump() on boolean variables ***
456 -- Iteration 1 --
457 bool(true)
458 -- Iteration 2 --
459 bool(false)
460 -- Iteration 3 --
461 bool(true)
462 -- Iteration 4 --
463 bool(false)
464
465 *** Testing var_dump() on array variables ***
466 -- Iteration 1 --
467 array(0) {
468 }
469 -- Iteration 2 --
470 array(1) {
471   [0]=>
472   NULL
473 }
474 -- Iteration 3 --
475 array(1) {
476   [0]=>
477   NULL
478 }
479 -- Iteration 4 --
480 array(1) {
481   [0]=>
482   bool(true)
483 }
484 -- Iteration 5 --
485 array(1) {
486   [0]=>
487   string(0) ""
488 }
489 -- Iteration 6 --
490 array(1) {
491   [0]=>
492   string(0) ""
493 }
494 -- Iteration 7 --
495 array(2) {
496   [0]=>
497   array(0) {
498   }
499   [1]=>
500   array(0) {
501   }
502 }
503 -- Iteration 8 --
504 array(2) {
505   [0]=>
506   array(2) {
507     [0]=>
508     int(1)
509     [1]=>
510     int(2)
511   }
512   [1]=>
513   array(2) {
514     [0]=>
515     string(1) "a"
516     [1]=>
517     string(1) "b"
518   }
519 }
520 -- Iteration 9 --
521 array(1) {
522   [1]=>
523   string(3) "One"
524 }
525 -- Iteration 10 --
526 array(1) {
527   ["test"]=>
528   string(8) "is_array"
529 }
530 -- Iteration 11 --
531 array(1) {
532   [0]=>
533   int(0)
534 }
535 -- Iteration 12 --
536 array(1) {
537   [0]=>
538   int(-1)
539 }
540 -- Iteration 13 --
541 array(2) {
542   [0]=>
543   float(10.5)
544   [1]=>
545   float(5.6)
546 }
547 -- Iteration 14 --
548 array(2) {
549   [0]=>
550   string(6) "string"
551   [1]=>
552   string(4) "test"
553 }
554 -- Iteration 15 --
555 array(2) {
556   [0]=>
557   string(6) "string"
558   [1]=>
559   string(4) "test"
560 }
561
562 *** Testing var_dump() on object variables ***
563 -- Iteration 1 --
564 object(object_class)#6 (7) {
565   ["value"]=>
566   int(50)
567   ["public_var1"]=>
568   int(10)
569   ["private_var1":"object_class":private]=>
570   int(20)
571   ["private_var2":"object_class":private]=>
572   int(21)
573   ["protected_var1":protected]=>
574   string(8) "string_1"
575   ["protected_var2":protected]=>
576   string(8) "string_2"
577   ["public_var2"]=>
578   int(11)
579 }
580 -- Iteration 2 --
581 object(no_member_class)#7 (0) {
582 }
583 -- Iteration 3 --
584 object(contains_object_class)#8 (7) {
585   ["p"]=>
586   int(30)
587   ["class_object1"]=>
588   object(object_class)#9 (7) {
589     ["value"]=>
590     int(50)
591     ["public_var1"]=>
592     int(10)
593     ["private_var1":"object_class":private]=>
594     int(20)
595     ["private_var2":"object_class":private]=>
596     int(21)
597     ["protected_var1":protected]=>
598     string(8) "string_1"
599     ["protected_var2":protected]=>
600     string(8) "string_2"
601     ["public_var2"]=>
602     int(11)
603   }
604   ["class_object2"]=>
605   object(object_class)#10 (7) {
606     ["value"]=>
607     int(50)
608     ["public_var1"]=>
609     int(10)
610     ["private_var1":"object_class":private]=>
611     int(20)
612     ["private_var2":"object_class":private]=>
613     int(21)
614     ["protected_var1":protected]=>
615     string(8) "string_1"
616     ["protected_var2":protected]=>
617     string(8) "string_2"
618     ["public_var2"]=>
619     int(11)
620   }
621   ["class_object3":"contains_object_class":private]=>
622   object(object_class)#9 (7) {
623     ["value"]=>
624     int(50)
625     ["public_var1"]=>
626     int(10)
627     ["private_var1":"object_class":private]=>
628     int(20)
629     ["private_var2":"object_class":private]=>
630     int(21)
631     ["protected_var1":protected]=>
632     string(8) "string_1"
633     ["protected_var2":protected]=>
634     string(8) "string_2"
635     ["public_var2"]=>
636     int(11)
637   }
638   ["class_object4":protected]=>
639   object(object_class)#10 (7) {
640     ["value"]=>
641     int(50)
642     ["public_var1"]=>
643     int(10)
644     ["private_var1":"object_class":private]=>
645     int(20)
646     ["private_var2":"object_class":private]=>
647     int(21)
648     ["protected_var1":protected]=>
649     string(8) "string_1"
650     ["protected_var2":protected]=>
651     string(8) "string_2"
652     ["public_var2"]=>
653     int(11)
654   }
655   ["no_member_class_object"]=>
656   object(no_member_class)#11 (0) {
657   }
658   ["class_object5"]=>
659   *RECURSION*
660 }
661 -- Iteration 4 --
662 object(contains_object_class)#1 (7) {
663   ["p"]=>
664   int(30)
665   ["class_object1"]=>
666   object(object_class)#2 (7) {
667     ["value"]=>
668     int(50)
669     ["public_var1"]=>
670     int(10)
671     ["private_var1":"object_class":private]=>
672     int(20)
673     ["private_var2":"object_class":private]=>
674     int(21)
675     ["protected_var1":protected]=>
676     string(8) "string_1"
677     ["protected_var2":protected]=>
678     string(8) "string_2"
679     ["public_var2"]=>
680     int(11)
681   }
682   ["class_object2"]=>
683   object(object_class)#3 (7) {
684     ["value"]=>
685     int(50)
686     ["public_var1"]=>
687     int(10)
688     ["private_var1":"object_class":private]=>
689     int(20)
690     ["private_var2":"object_class":private]=>
691     int(21)
692     ["protected_var1":protected]=>
693     string(8) "string_1"
694     ["protected_var2":protected]=>
695     string(8) "string_2"
696     ["public_var2"]=>
697     int(11)
698   }
699   ["class_object3":"contains_object_class":private]=>
700   object(object_class)#2 (7) {
701     ["value"]=>
702     int(50)
703     ["public_var1"]=>
704     int(10)
705     ["private_var1":"object_class":private]=>
706     int(20)
707     ["private_var2":"object_class":private]=>
708     int(21)
709     ["protected_var1":protected]=>
710     string(8) "string_1"
711     ["protected_var2":protected]=>
712     string(8) "string_2"
713     ["public_var2"]=>
714     int(11)
715   }
716   ["class_object4":protected]=>
717   object(object_class)#3 (7) {
718     ["value"]=>
719     int(50)
720     ["public_var1"]=>
721     int(10)
722     ["private_var1":"object_class":private]=>
723     int(20)
724     ["private_var2":"object_class":private]=>
725     int(21)
726     ["protected_var1":protected]=>
727     string(8) "string_1"
728     ["protected_var2":protected]=>
729     string(8) "string_2"
730     ["public_var2"]=>
731     int(11)
732   }
733   ["no_member_class_object"]=>
734   object(no_member_class)#4 (0) {
735   }
736   ["class_object5"]=>
737   *RECURSION*
738 }
739 -- Iteration 5 --
740 object(object_class)#2 (7) {
741   ["value"]=>
742   int(50)
743   ["public_var1"]=>
744   int(10)
745   ["private_var1":"object_class":private]=>
746   int(20)
747   ["private_var2":"object_class":private]=>
748   int(21)
749   ["protected_var1":protected]=>
750   string(8) "string_1"
751   ["protected_var2":protected]=>
752   string(8) "string_2"
753   ["public_var2"]=>
754   int(11)
755 }
756 -- Iteration 6 --
757 object(object_class)#3 (7) {
758   ["value"]=>
759   int(50)
760   ["public_var1"]=>
761   int(10)
762   ["private_var1":"object_class":private]=>
763   int(20)
764   ["private_var2":"object_class":private]=>
765   int(21)
766   ["protected_var1":protected]=>
767   string(8) "string_1"
768   ["protected_var2":protected]=>
769   string(8) "string_2"
770   ["public_var2"]=>
771   int(11)
772 }
773 -- Iteration 7 --
774 object(no_member_class)#4 (0) {
775 }
776 -- Iteration 8 --
777 object(object_class)#5 (7) {
778   ["value"]=>
779   int(50)
780   ["public_var1"]=>
781   int(10)
782   ["private_var1":"object_class":private]=>
783   int(20)
784   ["private_var2":"object_class":private]=>
785   int(21)
786   ["protected_var1":protected]=>
787   string(8) "string_1"
788   ["protected_var2":protected]=>
789   string(8) "string_2"
790   ["public_var2"]=>
791   int(11)
792 }
793 -- Iteration 9 --
794 NULL
795
796 ** Testing var_dump() on objects having circular reference **
797 object(object_class)#13 (8) {
798   ["value"]=>
799   int(50)
800   ["public_var1"]=>
801   int(10)
802   ["private_var1":"object_class":private]=>
803   int(20)
804   ["private_var2":"object_class":private]=>
805   int(21)
806   ["protected_var1":protected]=>
807   string(8) "string_1"
808   ["protected_var2":protected]=>
809   string(8) "string_2"
810   ["public_var2"]=>
811   int(11)
812   ["obj"]=>
813   &object(object_class)#12 (8) {
814     ["value"]=>
815     int(50)
816     ["public_var1"]=>
817     int(10)
818     ["private_var1":"object_class":private]=>
819     int(20)
820     ["private_var2":"object_class":private]=>
821     int(21)
822     ["protected_var1":protected]=>
823     string(8) "string_1"
824     ["protected_var2":protected]=>
825     string(8) "string_2"
826     ["public_var2"]=>
827     int(11)
828     ["obj"]=>
829     *RECURSION*
830   }
831 }
832
833 *** Testing var_dump() on resources ***
834 -- Iteration 1 --
835 resource(5) of type (stream)
836 -- Iteration 2 --
837 resource(6) of type (stream)
838
839 *** Testing var_dump() on different combinations of scalar
840     and non-scalar variables ***
841 -- Iteration 1 --
842 array(3) {
843   [0]=>
844   int(123)
845   [1]=>
846   float(-1.2345)
847   [2]=>
848   string(1) "a"
849 }
850 -- Iteration 2 --
851 array(4) {
852   [0]=>
853   string(1) "d"
854   [1]=>
855   array(3) {
856     [0]=>
857     int(1)
858     [1]=>
859     int(3)
860     [2]=>
861     int(5)
862   }
863   [2]=>
864   bool(true)
865   [3]=>
866   NULL
867 }
868 -- Iteration 3 --
869 array(4) {
870   [0]=>
871   object(no_member_class)#14 (0) {
872   }
873   [1]=>
874   array(0) {
875   }
876   [2]=>
877   bool(false)
878   [3]=>
879   int(0)
880 }
881 -- Iteration 4 --
882 array(6) {
883   [0]=>
884   float(-0)
885   [1]=>
886   string(11) "Where am I?"
887   [2]=>
888   array(3) {
889     [0]=>
890     int(7)
891     [1]=>
892     int(8)
893     [2]=>
894     int(9)
895   }
896   [3]=>
897   bool(true)
898   [4]=>
899   string(1) "A"
900   [5]=>
901   int(987654321)
902 }
903 -- Iteration 5 --
904 array(4) {
905   [0]=>
906   NULL
907   [1]=>
908   float(20000000000)
909   [2]=>
910   float(79.1)
911   [3]=>
912   float(4.599998)
913 }
914 -- Iteration 6 --
915 array(4) {
916   [0]=>
917   string(27) "array(1,2,3,4)1.0000002TRUE"
918   [1]=>
919   NULL
920   [2]=>
921   float(4611333)
922   [3]=>
923   string(5) "/00\7"
924 }
925
926 *** Testing var_dump() on miscellaneous input arguments ***
927 -- Iteration 1 --
928 NULL
929 -- Iteration 2 --
930 NULL
931 -- Iteration 3 --
932 NULL
933 -- Iteration 4 --
934 NULL
935
936 *** Testing var_dump() on multiple arguments ***
937 array(15) {
938   [0]=>
939   int(0)
940   [1]=>
941   int(83)
942   [2]=>
943   int(123000000)
944   [3]=>
945   int(-83)
946   [4]=>
947   int(-12300000)
948   [5]=>
949   array(10) {
950     [0]=>
951     int(1)
952     [1]=>
953     int(2)
954     [2]=>
955     int(3)
956     [3]=>
957     int(4)
958     [4]=>
959     int(5)
960     [5]=>
961     int(6)
962     [6]=>
963     int(7)
964     [7]=>
965     int(8)
966     [8]=>
967     int(9)
968     [9]=>
969     int(10)
970   }
971   [6]=>
972   array(10) {
973     [0]=>
974     int(-1)
975     [1]=>
976     int(-2)
977     [2]=>
978     int(-3)
979     [3]=>
980     int(-4)
981     [4]=>
982     int(-5)
983     [5]=>
984     int(-6)
985     [6]=>
986     int(-7)
987     [7]=>
988     int(-8)
989     [8]=>
990     int(-9)
991     [9]=>
992     int(-10)
993   }
994   [7]=>
995   int(2147483647)
996   [8]=>
997   int(2147483648)
998   [9]=>
999   int(-2147483648)
1000   [10]=>
1001   int(-2147483647)
1002   [11]=>
1003   int(2147483647)
1004   [12]=>
1005   int(-2147483648)
1006   [13]=>
1007   int(2147483647)
1008   [14]=>
1009   int(-2147483648)
1010 }
1011 array(32) {
1012   [0]=>
1013   float(-0)
1014   [1]=>
1015   float(0)
1016   [2]=>
1017   float(1.234)
1018   [3]=>
1019   float(-1.234)
1020   [4]=>
1021   float(-2)
1022   [5]=>
1023   float(2)
1024   [6]=>
1025   float(-0.5)
1026   [7]=>
1027   float(0.567)
1028   [8]=>
1029   float(-0.00067)
1030   [9]=>
1031   float(-670)
1032   [10]=>
1033   float(670)
1034   [11]=>
1035   float(670)
1036   [12]=>
1037   float(-0.00410003)
1038   [13]=>
1039   float(-4100.03)
1040   [14]=>
1041   float(0.004100003)
1042   [15]=>
1043   float(4100.003)
1044   [16]=>
1045   float(100000)
1046   [17]=>
1047   float(-100000)
1048   [18]=>
1049   float(1.0E-5)
1050   [19]=>
1051   float(-1.0E-5)
1052   [20]=>
1053   float(100000)
1054   [21]=>
1055   float(-100000)
1056   [22]=>
1057   float(100000)
1058   [23]=>
1059   float(-100000)
1060   [24]=>
1061   float(100000)
1062   [25]=>
1063   float(-100000)
1064   [26]=>
1065   float(1.0E-5)
1066   [27]=>
1067   float(-1.0E-5)
1068   [28]=>
1069   int(-2147483649)
1070   [29]=>
1071   int(2147483649)
1072   [30]=>
1073   int(2147483649)
1074   [31]=>
1075   int(-2147483649)
1076 }
1077 array(14) {
1078   [0]=>
1079   string(0) ""
1080   [1]=>
1081   string(0) ""
1082   [2]=>
1083   string(1) " "
1084   [3]=>
1085   string(1) " "
1086   [4]=>
1087   string(1) "0"
1088   [5]=>
1089   string(1) "\0"
1090   [6]=>
1091   string(2) "\0"
1092   [7]=>
1093   string(1) "   "
1094   [8]=>
1095   string(2) "\t"
1096   [9]=>
1097   string(3) "PHP"
1098   [10]=>
1099   string(3) "PHP"
1100   [11]=>
1101   string(29) "abcd\0n1234\005678\000efgh\xijkl"
1102   [12]=>
1103   string(34) "abcd\0efgh\0ijkl\0mnop\00qrst\0uvwx\00yz"
1104   [13]=>
1105   string(22) "1234      
1106 5678
1107         9100"abcda"
1108 }
1109 array(15) {
1110   [0]=>
1111   array(0) {
1112   }
1113   [1]=>
1114   array(1) {
1115     [0]=>
1116     NULL
1117   }
1118   [2]=>
1119   array(1) {
1120     [0]=>
1121     NULL
1122   }
1123   [3]=>
1124   array(1) {
1125     [0]=>
1126     bool(true)
1127   }
1128   [4]=>
1129   array(1) {
1130     [0]=>
1131     string(0) ""
1132   }
1133   [5]=>
1134   array(1) {
1135     [0]=>
1136     string(0) ""
1137   }
1138   [6]=>
1139   array(2) {
1140     [0]=>
1141     array(0) {
1142     }
1143     [1]=>
1144     array(0) {
1145     }
1146   }
1147   [7]=>
1148   array(2) {
1149     [0]=>
1150     array(2) {
1151       [0]=>
1152       int(1)
1153       [1]=>
1154       int(2)
1155     }
1156     [1]=>
1157     array(2) {
1158       [0]=>
1159       string(1) "a"
1160       [1]=>
1161       string(1) "b"
1162     }
1163   }
1164   [8]=>
1165   array(1) {
1166     [1]=>
1167     string(3) "One"
1168   }
1169   [9]=>
1170   array(1) {
1171     ["test"]=>
1172     string(8) "is_array"
1173   }
1174   [10]=>
1175   array(1) {
1176     [0]=>
1177     int(0)
1178   }
1179   [11]=>
1180   array(1) {
1181     [0]=>
1182     int(-1)
1183   }
1184   [12]=>
1185   array(2) {
1186     [0]=>
1187     float(10.5)
1188     [1]=>
1189     float(5.6)
1190   }
1191   [13]=>
1192   array(2) {
1193     [0]=>
1194     string(6) "string"
1195     [1]=>
1196     string(4) "test"
1197   }
1198   [14]=>
1199   array(2) {
1200     [0]=>
1201     string(6) "string"
1202     [1]=>
1203     string(4) "test"
1204   }
1205 }
1206 array(4) {
1207   [0]=>
1208   bool(true)
1209   [1]=>
1210   bool(false)
1211   [2]=>
1212   bool(true)
1213   [3]=>
1214   bool(false)
1215 }
1216 array(2) {
1217   [0]=>
1218   resource(5) of type (stream)
1219   [1]=>
1220   resource(6) of type (stream)
1221 }
1222 array(9) {
1223   [0]=>
1224   object(object_class)#6 (7) {
1225     ["value"]=>
1226     int(50)
1227     ["public_var1"]=>
1228     int(10)
1229     ["private_var1":"object_class":private]=>
1230     int(20)
1231     ["private_var2":"object_class":private]=>
1232     int(21)
1233     ["protected_var1":protected]=>
1234     string(8) "string_1"
1235     ["protected_var2":protected]=>
1236     string(8) "string_2"
1237     ["public_var2"]=>
1238     int(11)
1239   }
1240   [1]=>
1241   object(no_member_class)#7 (0) {
1242   }
1243   [2]=>
1244   object(contains_object_class)#8 (7) {
1245     ["p"]=>
1246     int(30)
1247     ["class_object1"]=>
1248     object(object_class)#9 (7) {
1249       ["value"]=>
1250       int(50)
1251       ["public_var1"]=>
1252       int(10)
1253       ["private_var1":"object_class":private]=>
1254       int(20)
1255       ["private_var2":"object_class":private]=>
1256       int(21)
1257       ["protected_var1":protected]=>
1258       string(8) "string_1"
1259       ["protected_var2":protected]=>
1260       string(8) "string_2"
1261       ["public_var2"]=>
1262       int(11)
1263     }
1264     ["class_object2"]=>
1265     object(object_class)#10 (7) {
1266       ["value"]=>
1267       int(50)
1268       ["public_var1"]=>
1269       int(10)
1270       ["private_var1":"object_class":private]=>
1271       int(20)
1272       ["private_var2":"object_class":private]=>
1273       int(21)
1274       ["protected_var1":protected]=>
1275       string(8) "string_1"
1276       ["protected_var2":protected]=>
1277       string(8) "string_2"
1278       ["public_var2"]=>
1279       int(11)
1280     }
1281     ["class_object3":"contains_object_class":private]=>
1282     object(object_class)#9 (7) {
1283       ["value"]=>
1284       int(50)
1285       ["public_var1"]=>
1286       int(10)
1287       ["private_var1":"object_class":private]=>
1288       int(20)
1289       ["private_var2":"object_class":private]=>
1290       int(21)
1291       ["protected_var1":protected]=>
1292       string(8) "string_1"
1293       ["protected_var2":protected]=>
1294       string(8) "string_2"
1295       ["public_var2"]=>
1296       int(11)
1297     }
1298     ["class_object4":protected]=>
1299     object(object_class)#10 (7) {
1300       ["value"]=>
1301       int(50)
1302       ["public_var1"]=>
1303       int(10)
1304       ["private_var1":"object_class":private]=>
1305       int(20)
1306       ["private_var2":"object_class":private]=>
1307       int(21)
1308       ["protected_var1":protected]=>
1309       string(8) "string_1"
1310       ["protected_var2":protected]=>
1311       string(8) "string_2"
1312       ["public_var2"]=>
1313       int(11)
1314     }
1315     ["no_member_class_object"]=>
1316     object(no_member_class)#11 (0) {
1317     }
1318     ["class_object5"]=>
1319     *RECURSION*
1320   }
1321   [3]=>
1322   object(contains_object_class)#1 (7) {
1323     ["p"]=>
1324     int(30)
1325     ["class_object1"]=>
1326     object(object_class)#2 (7) {
1327       ["value"]=>
1328       int(50)
1329       ["public_var1"]=>
1330       int(10)
1331       ["private_var1":"object_class":private]=>
1332       int(20)
1333       ["private_var2":"object_class":private]=>
1334       int(21)
1335       ["protected_var1":protected]=>
1336       string(8) "string_1"
1337       ["protected_var2":protected]=>
1338       string(8) "string_2"
1339       ["public_var2"]=>
1340       int(11)
1341     }
1342     ["class_object2"]=>
1343     object(object_class)#3 (7) {
1344       ["value"]=>
1345       int(50)
1346       ["public_var1"]=>
1347       int(10)
1348       ["private_var1":"object_class":private]=>
1349       int(20)
1350       ["private_var2":"object_class":private]=>
1351       int(21)
1352       ["protected_var1":protected]=>
1353       string(8) "string_1"
1354       ["protected_var2":protected]=>
1355       string(8) "string_2"
1356       ["public_var2"]=>
1357       int(11)
1358     }
1359     ["class_object3":"contains_object_class":private]=>
1360     object(object_class)#2 (7) {
1361       ["value"]=>
1362       int(50)
1363       ["public_var1"]=>
1364       int(10)
1365       ["private_var1":"object_class":private]=>
1366       int(20)
1367       ["private_var2":"object_class":private]=>
1368       int(21)
1369       ["protected_var1":protected]=>
1370       string(8) "string_1"
1371       ["protected_var2":protected]=>
1372       string(8) "string_2"
1373       ["public_var2"]=>
1374       int(11)
1375     }
1376     ["class_object4":protected]=>
1377     object(object_class)#3 (7) {
1378       ["value"]=>
1379       int(50)
1380       ["public_var1"]=>
1381       int(10)
1382       ["private_var1":"object_class":private]=>
1383       int(20)
1384       ["private_var2":"object_class":private]=>
1385       int(21)
1386       ["protected_var1":protected]=>
1387       string(8) "string_1"
1388       ["protected_var2":protected]=>
1389       string(8) "string_2"
1390       ["public_var2"]=>
1391       int(11)
1392     }
1393     ["no_member_class_object"]=>
1394     object(no_member_class)#4 (0) {
1395     }
1396     ["class_object5"]=>
1397     *RECURSION*
1398   }
1399   [4]=>
1400   object(object_class)#2 (7) {
1401     ["value"]=>
1402     int(50)
1403     ["public_var1"]=>
1404     int(10)
1405     ["private_var1":"object_class":private]=>
1406     int(20)
1407     ["private_var2":"object_class":private]=>
1408     int(21)
1409     ["protected_var1":protected]=>
1410     string(8) "string_1"
1411     ["protected_var2":protected]=>
1412     string(8) "string_2"
1413     ["public_var2"]=>
1414     int(11)
1415   }
1416   [5]=>
1417   object(object_class)#3 (7) {
1418     ["value"]=>
1419     int(50)
1420     ["public_var1"]=>
1421     int(10)
1422     ["private_var1":"object_class":private]=>
1423     int(20)
1424     ["private_var2":"object_class":private]=>
1425     int(21)
1426     ["protected_var1":protected]=>
1427     string(8) "string_1"
1428     ["protected_var2":protected]=>
1429     string(8) "string_2"
1430     ["public_var2"]=>
1431     int(11)
1432   }
1433   [6]=>
1434   object(no_member_class)#4 (0) {
1435   }
1436   [7]=>
1437   object(object_class)#5 (7) {
1438     ["value"]=>
1439     int(50)
1440     ["public_var1"]=>
1441     int(10)
1442     ["private_var1":"object_class":private]=>
1443     int(20)
1444     ["private_var2":"object_class":private]=>
1445     int(21)
1446     ["protected_var1":protected]=>
1447     string(8) "string_1"
1448     ["protected_var2":protected]=>
1449     string(8) "string_2"
1450     ["public_var2"]=>
1451     int(11)
1452   }
1453   [8]=>
1454   NULL
1455 }
1456 array(4) {
1457   [0]=>
1458   NULL
1459   [1]=>
1460   NULL
1461   [2]=>
1462   NULL
1463   [3]=>
1464   NULL
1465 }
1466 array(6) {
1467   [0]=>
1468   array(3) {
1469     [0]=>
1470     int(123)
1471     [1]=>
1472     float(-1.2345)
1473     [2]=>
1474     string(1) "a"
1475   }
1476   [1]=>
1477   array(4) {
1478     [0]=>
1479     string(1) "d"
1480     [1]=>
1481     array(3) {
1482       [0]=>
1483       int(1)
1484       [1]=>
1485       int(3)
1486       [2]=>
1487       int(5)
1488     }
1489     [2]=>
1490     bool(true)
1491     [3]=>
1492     NULL
1493   }
1494   [2]=>
1495   array(4) {
1496     [0]=>
1497     object(no_member_class)#14 (0) {
1498     }
1499     [1]=>
1500     array(0) {
1501     }
1502     [2]=>
1503     bool(false)
1504     [3]=>
1505     int(0)
1506   }
1507   [3]=>
1508   array(6) {
1509     [0]=>
1510     float(-0)
1511     [1]=>
1512     string(11) "Where am I?"
1513     [2]=>
1514     array(3) {
1515       [0]=>
1516       int(7)
1517       [1]=>
1518       int(8)
1519       [2]=>
1520       int(9)
1521     }
1522     [3]=>
1523     bool(true)
1524     [4]=>
1525     string(1) "A"
1526     [5]=>
1527     int(987654321)
1528   }
1529   [4]=>
1530   array(4) {
1531     [0]=>
1532     NULL
1533     [1]=>
1534     float(20000000000)
1535     [2]=>
1536     float(79.1)
1537     [3]=>
1538     float(4.599998)
1539   }
1540   [5]=>
1541   array(4) {
1542     [0]=>
1543     string(27) "array(1,2,3,4)1.0000002TRUE"
1544     [1]=>
1545     NULL
1546     [2]=>
1547     float(4611333)
1548     [3]=>
1549     string(5) "/00\7"
1550   }
1551 }
1552 Done