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