|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-12-17 08:13 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 02:00:01 2025 UTC |
Description: ------------ Use of Variable arrays in magic functions result in Undefined property. Reproduce code: --------------- <?php class Test { var $two = array('fails'=>'Bru ha ha'); function __get($name) { $x = 'two'; print $this->$x['fails']; } } $test = new Test(); $y = $test->undeclared; ?> Expected result: ---------------- Bru ha ha Actual result: -------------- PHP Notice: Undefined property: Test::$t in /home/everett/test.php on line 9