|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-08 17:46 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 17:00:01 2025 UTC |
Description: ------------ If a __get() method returns a variable which is a reference, the 'Indirect modification of ...' error will not be shown. Reproduce code: --------------- class test { var $array = array(); function __get($var) { $v =& $this->array; return $this->array; } } $t = new test; $t->anything[] = 'bar'; print_r($t->anything); Expected result: ---------------- Notice: Indirect modification of overloaded property test::$anything has no effect in test.php on line 10 Array ( ) Actual result: -------------- Array ( )