Re: print_r unaware of object's read_property handler
| From: | Michael Wallner | Date: | Fri, 16 Feb 2007 11:30:46 +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-4558@lists.php.net to get a copy of this message | ||
Piotr Pokora wrote:
> 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?
Are you sure you don't have an equivalent php_error("GET PROP") call in your
get_property() handler?
--
Michael