#24608 [Opn->Ver]: __set not triggered when overloading with array

From: Date: Sat, 02 Aug 2003 10:06:53 +0000
Subject: #24608 [Opn->Ver]: __set not triggered when overloading with array
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-45218@lists.php.net to get a copy of this message
ID: 24608 Updated by: sniper@php.net Reported By: jaanus at heeringson dot com -Status: Open +Status: Verified -Bug Type: Class/Object related +Bug Type: Zend Engine 2 problem Operating System: Linux 2.4 jkernel source distro -PHP Version: 5.0.0b1 (beta1) +PHP Version: 5.0.0b2-dev Previous Comments: ------------------------------------------------------------------------ [2003-07-11 12:48:38] jaanus at heeringson dot com Description: ------------ When overloading a class with a property containing an array by assigning an element to to the new array the __set handle does not fire, but the element gets created. Reproduce code: --------------- <?php class myclass { public function __set($name,$data) { echo("Name: {$name}<br/>\nData: {$data}<br/>\n"); //prints out input when fired } } $test=new myclass(); $test->style['temp']='content'; //creates a new property print_r($test->style); //check if property is created ?> Expected result: ---------------- Results from the echo in __set Actual result: -------------- The result of the print_r shows that the property is created, but id did not pass the __set ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24608&edit=1

« previous php.bugs (#45218) next »