|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-16 02:13 UTC] andrew@php.net
[2004-01-05 06:53 UTC] stas@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 09:00:01 2025 UTC |
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