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