ID: 45728
Updated by: [EMAIL PROTECTED]
Reported By: thinice at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Scripting Engine problem
Operating System: FreeBSD
PHP Version: 5.2.6
New Comment:
Where exactly it says this should work..?
Previous Comments:
------------------------------------------------------------------------
[2008-08-06 02:00:46] thinice at gmail dot com
Description:
------------
When you try to access a static variable within a class using a
variable variable to determine which class and static to use.
Reproduce code:
---------------
<?
class MyTest {
static $myVar = 'testval';
}
$sClass = 'MyTest';
echo "Expected output: ".MyTest::$myVar;
echo "<br/>";
$s = $sClass.'::$myVar';
echo "Using this as the string: ".$s."<br/>";
echo "Using Variable-named reference: ".${$s};
?>
Expected result:
----------------
Expected output: testval
Using this as the string: MyTest::$myVar
Using Variable-named reference: testval
Actual result:
--------------
Expected output: testval
Using this as the string: MyTest::$myVar
Using Variable-named reference:
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45728&edit=1