#50505 [Opn->Bgs]: Variable arrays in magic functions don't work

From: Date: Thu, 17 Dec 2009 08:13:10 +0000
Subject: #50505 [Opn->Bgs]: Variable arrays in magic functions don't work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-145838@lists.php.net to get a copy of this message
ID: 50505 Updated by: jani@php.net Reported By: everett at fireproofsocks dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Cent OS 5.4(?) uname -r 2.6.18-9 PHP Version: 5.3.1 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2009-12-17 07:35:12] everett at fireproofsocks dot com 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50505&edit=1

« previous php.bugs (#145838) next »