On 09/03/2010 01:20 PM, Pierre Joye wrote:
hehe, I did not mean that this mail was offensive. Only that this
stuff is the best way to get mad at php internals. A more verbose post
would help to, what's your actual proposal/wish or an example case :)

Alright then.

OBJECTS2_HOWTO--okay maybe a tiny bit out of date, but nevertheless--states
that for the get_property_ptr_ptr object handler, which is supposed to
return zval** of the property, one can use zend_proxy_objects for
properties not really existing as zvals.

This objects overload the get and set object handlers (note: not __get/__set)
to enable something along the lines:

class user_class extends internal_class {
        function method() {
                $ref = &$this->internal_property;
                /* $ref now actually is a zend_proxy_object */
                $ref = 1;
        }
}

... but no other object handler that add_ref, del_ref, clone_obj, get
and set are defined, which causes everything from fatal errors to SEGVs
on simple statements like var_dump, echo, (string)-cast etc...

Additionally on object destruction, at the latest on shutdown,
(the default) zend_objects_destroy_object causes a SEGV because
zend_proxy_objects actually are not zend_objects and don't have
a class entry.

Hrm.. after re-reading this mail, I don't think it's more
comprehensive than the first one... ;)

Mike

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to