Bug #51825 [Opn->Bgs]: Calling a static property with a dynamic class name fails
| From: | felipe@php.net | Date: | Fri, 14 May 2010 15:11:46 +0000 |
| Subject: | Bug #51825 [Opn->Bgs]: Calling a static property with a dynamic class name fails | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150475@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51825&edit=1
ID: 51825
Updated by: felipe@php.net
Reported by: anis dot berejeb at gmail dot com
Summary: Calling a static property with a dynamic class name
fails
-Status: Open
+Status: Bogus
Type: Bug
Package: Scripting Engine problem
Operating System: Ubuntu 9.10
PHP Version: 5.2.13
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This feature was added in 5.3.0.
http://docs.php.net/manual/en/language.oop5.static.php
Previous Comments:
------------------------------------------------------------------------
[2010-05-14 17:07:53] anis dot berejeb at gmail dot com
Description:
------------
When we call a static property with a dynamic class name, the call fails
Test script:
---------------
<?php
class foo {
public static $bar = 'OK';
}
$foo = 'foo';
echo $foo::$bar;
Expected result:
----------------
OK
Actual result:
--------------
syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting ',' or ';' in
/home/user/test.php on line 5
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51825&edit=1