难以理解对象的print_r / var_dump

时间:2012-03-09 15:41:58

标签: php

以下对象中的存储是什么?

我从未遇到过这种类型的var_dump或print_r。

是CFArray对象的属性吗?如果是的什么是ArrayObject?

我仔细查看并假设,存储是CFArray对象的属性,具有另一个类ArrayObject的类型。请纠正我...... :)

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" }
                } } 

1 个答案:

答案 0 :(得分:2)

是的,这是私人财产。这是ArrayObject