|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-09-08 14:41 UTC] sjoerd@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 13:00:01 2025 UTC |
Description: ------------ look @ the code.... Reproduce code: --------------- <?php error_reporting(E_ALL); class newclass { private $properties; public function &__get($key) { echo "get $key<br>"; return $this->properties[$key]; } public function __set($key, $val) { echo "set $key to $val<br>"; $this->properties[$key] = $val; } } $c = new newclass; $c->array['test'] = 'test'; Expected result: ---------------- get array set array to test Actual result: -------------- get array