1--TEST-- 2Test debug_zval_dump() function : working on objects 3--SKIPIF-- 4<?php if (PHP_ZTS) { print "skip only for no-zts build"; } 5--FILE-- 6<?php 7/* Prototype: void debug_zval_dump ( mixed $variable ); 8 Description: Dumps a string representation of an internal zend value to output. 9*/ 10 11/* Prototype: void zval_dump( $value ); 12 Description: use debug_zval_dump() to display the objects and its 13 reference count */ 14function zval_dump( $values ) { 15 $counter = 1; 16 foreach( $values as $value ) { 17 echo "-- Iteration $counter --\n"; 18 debug_zval_dump( $value ); 19 $counter++; 20 } 21} 22 23/* checking on objects type */ 24echo "*** Testing debug_zval_dump() on objects ***\n"; 25class object_class { 26 var $value1 = 1; 27 private $value2 = 10; 28 protected $value3 = 20; 29 public $value4 = 30; 30 31 private function foo1() { 32 echo "function foo1\n"; 33 } 34 protected function foo2() { 35 echo "function foo2\n"; 36 } 37 public function foo3() { 38 echo "function foo3\n"; 39 } 40 public $array_var = array( "key1" => 1, "key2 " => 3); 41 42 function object_class () { 43 $this->value1 = 5; 44 $this->object_class1 = $this; 45 } 46} 47 48class no_member_class{ 49//no members 50} 51 52/* class with member as object of other class */ 53class contains_object_class 54{ 55 var $p = 30; 56 protected $p1 = 40; 57 private $p2 = 50; 58 var $class_object1; 59 public $class_object2; 60 private $class_object3; 61 protected $class_object4; 62 var $no_member_class_object; 63 64 public function func() { 65 echo "func() is called \n"; 66 } 67 68 function contains_object_class () { 69 $this->class_object1 = new object_class(); 70 $this->class_object2 = new object_class(); 71 $this->class_object3 = $this->class_object1; 72 $this->class_object4 = $this->class_object2; 73 $this->no_member_class_object = new no_member_class(); 74 $this->class_object5 = $this; //recursive reference 75 } 76} 77 78/* creating new object $obj */ 79$obj = new contains_object_class(); 80$obj1 = & $obj; //object $obj1 references object $obj 81$obj2 = & $obj; 82$obj3 = & $obj2; 83 84/* object which is unset */ 85$unset_obj = new object_class(); 86unset($unset_obj); 87 88$objects = array ( 89 new object_class, 90 new no_member_class, 91 $obj, 92 $obj->class_object1, 93 $obj->class_object2, 94 $obj->no_member_class_object, 95 @$temp_class_obj, //undefined object 96 $obj2->class_object1, 97 $obj3->class_object2, 98 $obj2->class_object1->value4, 99 @$unset_obj 100); 101/* using zval_dump() to dump out the objects and its reference count */ 102zval_dump($objects); 103 104$int_var = 500; 105$obj = $int_var; //$obj is lost, $obj1,$obj2,$obj3,$obj4 = 500 106echo "\n-- Testing debug_zval_dump() on overwritten object variables --\n"; 107debug_zval_dump($obj, $obj1, $obj2, $obj3); 108 109echo "\n-- Testing debug_zval_dump() on objects having circular reference --\n"; 110$recursion_obj1 = new object_class(); 111$recursion_obj2 = new object_class(); 112$recursion_obj1->obj = &$recursion_obj2; //circular reference 113$recursion_obj2->obj = &$recursion_obj1; //circular reference 114debug_zval_dump($recursion_obj2); 115 116echo "Done\n"; 117?> 118--EXPECTF-- 119*** Testing debug_zval_dump() on objects *** 120-- Iteration 1 -- 121object(object_class)#%d (6) refcount(5){ 122 ["value1"]=> 123 long(5) refcount(1) 124 ["value2":"object_class":private]=> 125 long(10) refcount(5) 126 ["value3":protected]=> 127 long(20) refcount(5) 128 ["value4"]=> 129 long(30) refcount(7) 130 ["array_var"]=> 131 array(2) refcount(5){ 132 ["key1"]=> 133 long(1) refcount(1) 134 ["key2 "]=> 135 long(3) refcount(1) 136 } 137 ["object_class1"]=> 138 object(object_class)#%d (6) refcount(5){ 139 ["value1"]=> 140 long(5) refcount(1) 141 ["value2":"object_class":private]=> 142 long(10) refcount(5) 143 ["value3":protected]=> 144 long(20) refcount(5) 145 ["value4"]=> 146 long(30) refcount(7) 147 ["array_var"]=> 148 array(2) refcount(5){ 149 ["key1"]=> 150 long(1) refcount(1) 151 ["key2 "]=> 152 long(3) refcount(1) 153 } 154 ["object_class1"]=> 155 *RECURSION* 156 } 157} 158-- Iteration 2 -- 159object(no_member_class)#%d (0) refcount(4){ 160} 161-- Iteration 3 -- 162object(contains_object_class)#%d (9) refcount(4){ 163 ["p"]=> 164 long(30) refcount(2) 165 ["p1":protected]=> 166 long(40) refcount(2) 167 ["p2":"contains_object_class":private]=> 168 long(50) refcount(2) 169 ["class_object1"]=> 170 object(object_class)#%d (6) refcount(7){ 171 ["value1"]=> 172 long(5) refcount(1) 173 ["value2":"object_class":private]=> 174 long(10) refcount(5) 175 ["value3":protected]=> 176 long(20) refcount(5) 177 ["value4"]=> 178 long(30) refcount(7) 179 ["array_var"]=> 180 array(2) refcount(5){ 181 ["key1"]=> 182 long(1) refcount(1) 183 ["key2 "]=> 184 long(3) refcount(1) 185 } 186 ["object_class1"]=> 187 object(object_class)#%d (6) refcount(7){ 188 ["value1"]=> 189 long(5) refcount(1) 190 ["value2":"object_class":private]=> 191 long(10) refcount(5) 192 ["value3":protected]=> 193 long(20) refcount(5) 194 ["value4"]=> 195 long(30) refcount(7) 196 ["array_var"]=> 197 array(2) refcount(5){ 198 ["key1"]=> 199 long(1) refcount(1) 200 ["key2 "]=> 201 long(3) refcount(1) 202 } 203 ["object_class1"]=> 204 *RECURSION* 205 } 206 } 207 ["class_object2"]=> 208 object(object_class)#%d (6) refcount(7){ 209 ["value1"]=> 210 long(5) refcount(1) 211 ["value2":"object_class":private]=> 212 long(10) refcount(5) 213 ["value3":protected]=> 214 long(20) refcount(5) 215 ["value4"]=> 216 long(30) refcount(7) 217 ["array_var"]=> 218 array(2) refcount(5){ 219 ["key1"]=> 220 long(1) refcount(1) 221 ["key2 "]=> 222 long(3) refcount(1) 223 } 224 ["object_class1"]=> 225 object(object_class)#%d (6) refcount(7){ 226 ["value1"]=> 227 long(5) refcount(1) 228 ["value2":"object_class":private]=> 229 long(10) refcount(5) 230 ["value3":protected]=> 231 long(20) refcount(5) 232 ["value4"]=> 233 long(30) refcount(7) 234 ["array_var"]=> 235 array(2) refcount(5){ 236 ["key1"]=> 237 long(1) refcount(1) 238 ["key2 "]=> 239 long(3) refcount(1) 240 } 241 ["object_class1"]=> 242 *RECURSION* 243 } 244 } 245 ["class_object3":"contains_object_class":private]=> 246 object(object_class)#%d (6) refcount(7){ 247 ["value1"]=> 248 long(5) refcount(1) 249 ["value2":"object_class":private]=> 250 long(10) refcount(5) 251 ["value3":protected]=> 252 long(20) refcount(5) 253 ["value4"]=> 254 long(30) refcount(7) 255 ["array_var"]=> 256 array(2) refcount(5){ 257 ["key1"]=> 258 long(1) refcount(1) 259 ["key2 "]=> 260 long(3) refcount(1) 261 } 262 ["object_class1"]=> 263 object(object_class)#%d (6) refcount(7){ 264 ["value1"]=> 265 long(5) refcount(1) 266 ["value2":"object_class":private]=> 267 long(10) refcount(5) 268 ["value3":protected]=> 269 long(20) refcount(5) 270 ["value4"]=> 271 long(30) refcount(7) 272 ["array_var"]=> 273 array(2) refcount(5){ 274 ["key1"]=> 275 long(1) refcount(1) 276 ["key2 "]=> 277 long(3) refcount(1) 278 } 279 ["object_class1"]=> 280 *RECURSION* 281 } 282 } 283 ["class_object4":protected]=> 284 object(object_class)#%d (6) refcount(7){ 285 ["value1"]=> 286 long(5) refcount(1) 287 ["value2":"object_class":private]=> 288 long(10) refcount(5) 289 ["value3":protected]=> 290 long(20) refcount(5) 291 ["value4"]=> 292 long(30) refcount(7) 293 ["array_var"]=> 294 array(2) refcount(5){ 295 ["key1"]=> 296 long(1) refcount(1) 297 ["key2 "]=> 298 long(3) refcount(1) 299 } 300 ["object_class1"]=> 301 object(object_class)#%d (6) refcount(7){ 302 ["value1"]=> 303 long(5) refcount(1) 304 ["value2":"object_class":private]=> 305 long(10) refcount(5) 306 ["value3":protected]=> 307 long(20) refcount(5) 308 ["value4"]=> 309 long(30) refcount(7) 310 ["array_var"]=> 311 array(2) refcount(5){ 312 ["key1"]=> 313 long(1) refcount(1) 314 ["key2 "]=> 315 long(3) refcount(1) 316 } 317 ["object_class1"]=> 318 *RECURSION* 319 } 320 } 321 ["no_member_class_object"]=> 322 object(no_member_class)#%d (0) refcount(3){ 323 } 324 ["class_object5"]=> 325 object(contains_object_class)#%d (9) refcount(1){ 326 ["p"]=> 327 long(30) refcount(2) 328 ["p1":protected]=> 329 long(40) refcount(2) 330 ["p2":"contains_object_class":private]=> 331 long(50) refcount(2) 332 ["class_object1"]=> 333 object(object_class)#%d (6) refcount(7){ 334 ["value1"]=> 335 long(5) refcount(1) 336 ["value2":"object_class":private]=> 337 long(10) refcount(5) 338 ["value3":protected]=> 339 long(20) refcount(5) 340 ["value4"]=> 341 long(30) refcount(7) 342 ["array_var"]=> 343 array(2) refcount(5){ 344 ["key1"]=> 345 long(1) refcount(1) 346 ["key2 "]=> 347 long(3) refcount(1) 348 } 349 ["object_class1"]=> 350 object(object_class)#%d (6) refcount(7){ 351 ["value1"]=> 352 long(5) refcount(1) 353 ["value2":"object_class":private]=> 354 long(10) refcount(5) 355 ["value3":protected]=> 356 long(20) refcount(5) 357 ["value4"]=> 358 long(30) refcount(7) 359 ["array_var"]=> 360 array(2) refcount(5){ 361 ["key1"]=> 362 long(1) refcount(1) 363 ["key2 "]=> 364 long(3) refcount(1) 365 } 366 ["object_class1"]=> 367 *RECURSION* 368 } 369 } 370 ["class_object2"]=> 371 object(object_class)#%d (6) refcount(7){ 372 ["value1"]=> 373 long(5) refcount(1) 374 ["value2":"object_class":private]=> 375 long(10) refcount(5) 376 ["value3":protected]=> 377 long(20) refcount(5) 378 ["value4"]=> 379 long(30) refcount(7) 380 ["array_var"]=> 381 array(2) refcount(5){ 382 ["key1"]=> 383 long(1) refcount(1) 384 ["key2 "]=> 385 long(3) refcount(1) 386 } 387 ["object_class1"]=> 388 object(object_class)#%d (6) refcount(7){ 389 ["value1"]=> 390 long(5) refcount(1) 391 ["value2":"object_class":private]=> 392 long(10) refcount(5) 393 ["value3":protected]=> 394 long(20) refcount(5) 395 ["value4"]=> 396 long(30) refcount(7) 397 ["array_var"]=> 398 array(2) refcount(5){ 399 ["key1"]=> 400 long(1) refcount(1) 401 ["key2 "]=> 402 long(3) refcount(1) 403 } 404 ["object_class1"]=> 405 *RECURSION* 406 } 407 } 408 ["class_object3":"contains_object_class":private]=> 409 object(object_class)#%d (6) refcount(7){ 410 ["value1"]=> 411 long(5) refcount(1) 412 ["value2":"object_class":private]=> 413 long(10) refcount(5) 414 ["value3":protected]=> 415 long(20) refcount(5) 416 ["value4"]=> 417 long(30) refcount(7) 418 ["array_var"]=> 419 array(2) refcount(5){ 420 ["key1"]=> 421 long(1) refcount(1) 422 ["key2 "]=> 423 long(3) refcount(1) 424 } 425 ["object_class1"]=> 426 object(object_class)#%d (6) refcount(7){ 427 ["value1"]=> 428 long(5) refcount(1) 429 ["value2":"object_class":private]=> 430 long(10) refcount(5) 431 ["value3":protected]=> 432 long(20) refcount(5) 433 ["value4"]=> 434 long(30) refcount(7) 435 ["array_var"]=> 436 array(2) refcount(5){ 437 ["key1"]=> 438 long(1) refcount(1) 439 ["key2 "]=> 440 long(3) refcount(1) 441 } 442 ["object_class1"]=> 443 *RECURSION* 444 } 445 } 446 ["class_object4":protected]=> 447 object(object_class)#%d (6) refcount(7){ 448 ["value1"]=> 449 long(5) refcount(1) 450 ["value2":"object_class":private]=> 451 long(10) refcount(5) 452 ["value3":protected]=> 453 long(20) refcount(5) 454 ["value4"]=> 455 long(30) refcount(7) 456 ["array_var"]=> 457 array(2) refcount(5){ 458 ["key1"]=> 459 long(1) refcount(1) 460 ["key2 "]=> 461 long(3) refcount(1) 462 } 463 ["object_class1"]=> 464 object(object_class)#%d (6) refcount(7){ 465 ["value1"]=> 466 long(5) refcount(1) 467 ["value2":"object_class":private]=> 468 long(10) refcount(5) 469 ["value3":protected]=> 470 long(20) refcount(5) 471 ["value4"]=> 472 long(30) refcount(7) 473 ["array_var"]=> 474 array(2) refcount(5){ 475 ["key1"]=> 476 long(1) refcount(1) 477 ["key2 "]=> 478 long(3) refcount(1) 479 } 480 ["object_class1"]=> 481 *RECURSION* 482 } 483 } 484 ["no_member_class_object"]=> 485 object(no_member_class)#%d (0) refcount(3){ 486 } 487 ["class_object5"]=> 488 *RECURSION* 489 } 490} 491-- Iteration 4 -- 492object(object_class)#%d (6) refcount(9){ 493 ["value1"]=> 494 long(5) refcount(1) 495 ["value2":"object_class":private]=> 496 long(10) refcount(5) 497 ["value3":protected]=> 498 long(20) refcount(5) 499 ["value4"]=> 500 long(30) refcount(7) 501 ["array_var"]=> 502 array(2) refcount(5){ 503 ["key1"]=> 504 long(1) refcount(1) 505 ["key2 "]=> 506 long(3) refcount(1) 507 } 508 ["object_class1"]=> 509 object(object_class)#%d (6) refcount(9){ 510 ["value1"]=> 511 long(5) refcount(1) 512 ["value2":"object_class":private]=> 513 long(10) refcount(5) 514 ["value3":protected]=> 515 long(20) refcount(5) 516 ["value4"]=> 517 long(30) refcount(7) 518 ["array_var"]=> 519 array(2) refcount(5){ 520 ["key1"]=> 521 long(1) refcount(1) 522 ["key2 "]=> 523 long(3) refcount(1) 524 } 525 ["object_class1"]=> 526 *RECURSION* 527 } 528} 529-- Iteration 5 -- 530object(object_class)#%d (6) refcount(9){ 531 ["value1"]=> 532 long(5) refcount(1) 533 ["value2":"object_class":private]=> 534 long(10) refcount(5) 535 ["value3":protected]=> 536 long(20) refcount(5) 537 ["value4"]=> 538 long(30) refcount(7) 539 ["array_var"]=> 540 array(2) refcount(5){ 541 ["key1"]=> 542 long(1) refcount(1) 543 ["key2 "]=> 544 long(3) refcount(1) 545 } 546 ["object_class1"]=> 547 object(object_class)#%d (6) refcount(9){ 548 ["value1"]=> 549 long(5) refcount(1) 550 ["value2":"object_class":private]=> 551 long(10) refcount(5) 552 ["value3":protected]=> 553 long(20) refcount(5) 554 ["value4"]=> 555 long(30) refcount(7) 556 ["array_var"]=> 557 array(2) refcount(5){ 558 ["key1"]=> 559 long(1) refcount(1) 560 ["key2 "]=> 561 long(3) refcount(1) 562 } 563 ["object_class1"]=> 564 *RECURSION* 565 } 566} 567-- Iteration 6 -- 568object(no_member_class)#%d (0) refcount(5){ 569} 570-- Iteration 7 -- 571NULL refcount(1) 572-- Iteration 8 -- 573object(object_class)#%d (6) refcount(9){ 574 ["value1"]=> 575 long(5) refcount(1) 576 ["value2":"object_class":private]=> 577 long(10) refcount(5) 578 ["value3":protected]=> 579 long(20) refcount(5) 580 ["value4"]=> 581 long(30) refcount(7) 582 ["array_var"]=> 583 array(2) refcount(5){ 584 ["key1"]=> 585 long(1) refcount(1) 586 ["key2 "]=> 587 long(3) refcount(1) 588 } 589 ["object_class1"]=> 590 object(object_class)#%d (6) refcount(9){ 591 ["value1"]=> 592 long(5) refcount(1) 593 ["value2":"object_class":private]=> 594 long(10) refcount(5) 595 ["value3":protected]=> 596 long(20) refcount(5) 597 ["value4"]=> 598 long(30) refcount(7) 599 ["array_var"]=> 600 array(2) refcount(5){ 601 ["key1"]=> 602 long(1) refcount(1) 603 ["key2 "]=> 604 long(3) refcount(1) 605 } 606 ["object_class1"]=> 607 *RECURSION* 608 } 609} 610-- Iteration 9 -- 611object(object_class)#%d (6) refcount(9){ 612 ["value1"]=> 613 long(5) refcount(1) 614 ["value2":"object_class":private]=> 615 long(10) refcount(5) 616 ["value3":protected]=> 617 long(20) refcount(5) 618 ["value4"]=> 619 long(30) refcount(7) 620 ["array_var"]=> 621 array(2) refcount(5){ 622 ["key1"]=> 623 long(1) refcount(1) 624 ["key2 "]=> 625 long(3) refcount(1) 626 } 627 ["object_class1"]=> 628 object(object_class)#%d (6) refcount(9){ 629 ["value1"]=> 630 long(5) refcount(1) 631 ["value2":"object_class":private]=> 632 long(10) refcount(5) 633 ["value3":protected]=> 634 long(20) refcount(5) 635 ["value4"]=> 636 long(30) refcount(7) 637 ["array_var"]=> 638 array(2) refcount(5){ 639 ["key1"]=> 640 long(1) refcount(1) 641 ["key2 "]=> 642 long(3) refcount(1) 643 } 644 ["object_class1"]=> 645 *RECURSION* 646 } 647} 648-- Iteration 10 -- 649long(30) refcount(9) 650-- Iteration 11 -- 651NULL refcount(1) 652 653-- Testing debug_zval_dump() on overwritten object variables -- 654long(500) refcount(1) 655long(500) refcount(1) 656long(500) refcount(1) 657long(500) refcount(1) 658 659-- Testing debug_zval_dump() on objects having circular reference -- 660object(object_class)#%d (7) refcount(1){ 661 ["value1"]=> 662 long(5) refcount(1) 663 ["value2":"object_class":private]=> 664 long(10) refcount(7) 665 ["value3":protected]=> 666 long(20) refcount(7) 667 ["value4"]=> 668 long(30) refcount(8) 669 ["array_var"]=> 670 array(2) refcount(7){ 671 ["key1"]=> 672 long(1) refcount(1) 673 ["key2 "]=> 674 long(3) refcount(1) 675 } 676 ["object_class1"]=> 677 object(object_class)#%d (7) refcount(1){ 678 ["value1"]=> 679 long(5) refcount(1) 680 ["value2":"object_class":private]=> 681 long(10) refcount(7) 682 ["value3":protected]=> 683 long(20) refcount(7) 684 ["value4"]=> 685 long(30) refcount(8) 686 ["array_var"]=> 687 array(2) refcount(7){ 688 ["key1"]=> 689 long(1) refcount(1) 690 ["key2 "]=> 691 long(3) refcount(1) 692 } 693 ["object_class1"]=> 694 *RECURSION* 695 ["obj"]=> 696 &object(object_class)#%d (7) refcount(2){ 697 ["value1"]=> 698 long(5) refcount(1) 699 ["value2":"object_class":private]=> 700 long(10) refcount(7) 701 ["value3":protected]=> 702 long(20) refcount(7) 703 ["value4"]=> 704 long(30) refcount(8) 705 ["array_var"]=> 706 array(2) refcount(7){ 707 ["key1"]=> 708 long(1) refcount(1) 709 ["key2 "]=> 710 long(3) refcount(1) 711 } 712 ["object_class1"]=> 713 object(object_class)#%d (7) refcount(1){ 714 ["value1"]=> 715 long(5) refcount(1) 716 ["value2":"object_class":private]=> 717 long(10) refcount(7) 718 ["value3":protected]=> 719 long(20) refcount(7) 720 ["value4"]=> 721 long(30) refcount(8) 722 ["array_var"]=> 723 array(2) refcount(7){ 724 ["key1"]=> 725 long(1) refcount(1) 726 ["key2 "]=> 727 long(3) refcount(1) 728 } 729 ["object_class1"]=> 730 *RECURSION* 731 ["obj"]=> 732 *RECURSION* 733 } 734 ["obj"]=> 735 *RECURSION* 736 } 737 } 738 ["obj"]=> 739 &object(object_class)#%d (7) refcount(2){ 740 ["value1"]=> 741 long(5) refcount(1) 742 ["value2":"object_class":private]=> 743 long(10) refcount(7) 744 ["value3":protected]=> 745 long(20) refcount(7) 746 ["value4"]=> 747 long(30) refcount(8) 748 ["array_var"]=> 749 array(2) refcount(7){ 750 ["key1"]=> 751 long(1) refcount(1) 752 ["key2 "]=> 753 long(3) refcount(1) 754 } 755 ["object_class1"]=> 756 object(object_class)#%d (7) refcount(1){ 757 ["value1"]=> 758 long(5) refcount(1) 759 ["value2":"object_class":private]=> 760 long(10) refcount(7) 761 ["value3":protected]=> 762 long(20) refcount(7) 763 ["value4"]=> 764 long(30) refcount(8) 765 ["array_var"]=> 766 array(2) refcount(7){ 767 ["key1"]=> 768 long(1) refcount(1) 769 ["key2 "]=> 770 long(3) refcount(1) 771 } 772 ["object_class1"]=> 773 *RECURSION* 774 ["obj"]=> 775 &object(object_class)#%d (7) refcount(2){ 776 ["value1"]=> 777 long(5) refcount(1) 778 ["value2":"object_class":private]=> 779 long(10) refcount(7) 780 ["value3":protected]=> 781 long(20) refcount(7) 782 ["value4"]=> 783 long(30) refcount(8) 784 ["array_var"]=> 785 array(2) refcount(7){ 786 ["key1"]=> 787 long(1) refcount(1) 788 ["key2 "]=> 789 long(3) refcount(1) 790 } 791 ["object_class1"]=> 792 *RECURSION* 793 ["obj"]=> 794 *RECURSION* 795 } 796 } 797 ["obj"]=> 798 &object(object_class)#%d (7) refcount(2){ 799 ["value1"]=> 800 long(5) refcount(1) 801 ["value2":"object_class":private]=> 802 long(10) refcount(7) 803 ["value3":protected]=> 804 long(20) refcount(7) 805 ["value4"]=> 806 long(30) refcount(8) 807 ["array_var"]=> 808 array(2) refcount(7){ 809 ["key1"]=> 810 long(1) refcount(1) 811 ["key2 "]=> 812 long(3) refcount(1) 813 } 814 ["object_class1"]=> 815 *RECURSION* 816 ["obj"]=> 817 &object(object_class)#%d (7) refcount(2){ 818 ["value1"]=> 819 long(5) refcount(1) 820 ["value2":"object_class":private]=> 821 long(10) refcount(7) 822 ["value3":protected]=> 823 long(20) refcount(7) 824 ["value4"]=> 825 long(30) refcount(8) 826 ["array_var"]=> 827 array(2) refcount(7){ 828 ["key1"]=> 829 long(1) refcount(1) 830 ["key2 "]=> 831 long(3) refcount(1) 832 } 833 ["object_class1"]=> 834 *RECURSION* 835 ["obj"]=> 836 *RECURSION* 837 } 838 } 839 } 840} 841Done 842