Not calling handlers on property modification

From: Date: Wed, 10 Dec 2003 04:21:49 +0000
Subject: Not calling handlers on property modification
Groups: php.internals 
Request: Send a blank email to internals+get-6331@lists.php.net to get a copy of this message
Hello internals, I'm writing extension that substitutes object's read_property and write_property handlers with it's own and I found that such code <?php class A { private $arr = array(); public function addToArr( $element ) { $this->arr[] = $element; } } $a = new A(); $something = new A(); $a->addToArr( $something ); ?> doesn't produce call to read_property or write_property. It seems strange because something like count( $this->arr ) or foreach( $this->arr as $element ) from A does produce call to read_property for "arr". Is it a bug or feature? If it's the expected behaviour, how can I intercept modification of array-type property? -- Best regards, Simeon mailto:xi@ngs.ru

« previous php.internals (#6331) next »