Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difficultly in understanding print_r/var_dump for object

Tags:

php

what is storage in the following Object?

I never came across such type of var_dump or print_r.

Is it property of CFArray Object? if yes what is ArrayObject?

I looked it very carefully and i am assuming, storage is a property of CFArray Object with type of another class ArrayObject. Please correct me... :)

print_r($response->body->zoneName());

CFArray Object ( 
                [storage:ArrayObject:private] => Array ( 
                   [0] => CFSimpleXML Object ( [0] => us-east-1a ) 
                   [1] => CFSimpleXML Object ( [0] => us-east-1b ) 
                   [2] => CFSimpleXML Object ( [0] => us-east-1c ) 
                   [3] => CFSimpleXML Object ( [0] => us-east-1d ) 
                ) ) 

var_dump($response->body->zoneName());

object(CFArray)#12 (1) { 
                 ["storage":"ArrayObject":private]=> array(4) { 
                 [0]=> object(CFSimpleXML)#9 (1) { [0]=> string(10) "us-east-1a" }    
                 [1]=> object(CFSimpleXML)#3 (1) { [0]=> string(10) "us-east-1b" }
                 [2]=> object(CFSimpleXML)#4 (1) { [0]=> string(10) "us-east-1c" }
                 [3]=> object(CFSimpleXML)#10 (1) { [0]=> string(10) "us-east-1d" }
                } } 
like image 758
P K Avatar asked Nov 04 '22 04:11

P K


1 Answers

Yes, it is a private property. And here is ArrayObject.

like image 144
xdazz Avatar answered Nov 07 '22 21:11

xdazz