Can't get zval write property handler working for ++/--/[]++ and other operators

From: Date: Sun, 30 Dec 2012 07:05:34 +0000
Subject: Can't get zval write property handler working for ++/--/[]++ and other operators
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-10117@lists.php.net to get a copy of this message
Hi. There is a zval property declared for a class. Direct overwriting like $obj->data = $new_data; works, but something like $obj->data['i']++; doesn't. What should I implement to support this? Tere are r/w property handlers: https://bitbucket.org/osmanov/pecl-ev/src/21fa7e5db9470c11c66cb8a5b554ca20f70deba4/pe.c?at=master#cl-22 There is a 'data' property declared for EvWatcher class. $obj->data = $obj->data - 1 works, but $obj->data--; doesn't. Also, $obj->data['i']-- $obj->data['i'] = $obj->data['i'] - 1 both don't modify the property either. I suspect I should whether return a reference in the read-handler, or implement some kind of handler, maybe get_property_ptr_pt(but how?) I've already "used the force reading the source", but I suspect there is a magic hidden under the parser... Couldn't find where/what to do with this, at least. ----- Regards, Ruslan Osmanov http://osmanov-dev-notes.blogspot.com/ | @ruslan_osmanov -- View this message in context: http://old.nabble.com/Can%27t-get-zval-write-property-handler-working-for-%2B%2B------%2B%2B-and-other-operators-tp34843859p34843859.html Sent from the Pecl - Dev mailing list archive at Nabble.com.

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