PHP 4.0 Bug #6489: Class array variable members not interpreted correctly within string

From: Date: Fri, 01 Sep 2000 17:56:25 +0000
Subject: PHP 4.0 Bug #6489: Class array variable members not interpreted correctly within string
Groups: php.dev 
Request: Send a blank email to php-dev+get-31609@lists.php.net to get a copy of this message
From: nathan@cjhunter.com Operating system: 2.0.36 PHP version: 4.0.1pl2 PHP Bug Type: Scripting Engine problem Bug description: Class array variable members not interpreted correctly within string When accessing a class array variable member from within a double quoted string it is not interpreted correctly. This is certainly not a critical bug but it would "user friendly" to the developere implement such a thing. Example.. <? class a { var $var = array("key" => "value"); } $inst = a(); echo "$a->var[key]"; ?> Gives us 'Array[key]' instead of what I would expect, which would be 'value'.

« previous php.dev (#31609) next »