Re: print_r unaware of object's read_property handler

From: Date: Fri, 16 Feb 2007 10:56:00 +0000
Subject: Re: print_r unaware of object's read_property handler
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-4557@lists.php.net to get a copy of this message
mike@php.net (Michael Wallner) wrote: > You don't need to care about get_properties() performance, as it only happens > for print_r() and var_dump() (mostly only used for debugging) and the array > cast, either not used that often. Trust me. I *really* , *really* , *really* appreciate your help here. But the more we talk and the more test code I write the more I am confused. I already pasted here example code: get_properties hook: php_error(E_WARNING, "GET PROP"); zend_object *zobj; zobj = Z_OBJ_P(zobject); return zobj->properties; PHP example code: echo "DISPLAY PROPERTY"; echo $a->property; Output: DISPLAY PROPERTY Warning: GET PROP in /home/pp/cvs/midgard/src/apis/php4/aa.php on line 12 value I do not use get_properties in read_property hook. Is this something with my PHP version? It clearly shows that get_property hook is invoked when user needs to read property with $obj->property code. How I shouldn't worry about performance here? Piotras

« previous php.pecl.dev (#4557) next »