ID: 42328
Updated by: [EMAIL PROTECTED]
Reported By: taquito at o2 dot pl
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: mandriva cooker
PHP Version: 5.2.4RC2
New Comment:
And that comment is already removed from the documentation and
documentation is being regenerated right this moment..this feature will
be in PHP 5.3..
Previous Comments:
------------------------------------------------------------------------
[2007-08-17 13:24:22] taquito at o2 dot pl
Description:
------------
documentation for Scope Resolution Operator (::) states "As of PHP
5.2.4, it's possible to reference the class using a variable", which is
not true.
example 19.12 is wrong
Reproduce code:
---------------
<?php
class MyClass {
const CONST_VALUE = 'A constant value';
}
$classname = 'MyClass';
echo $classname::CONST_VALUE;
echo MyClass::CONST_VALUE;
?>
Expected result:
----------------
A constant valueA constant value
Actual result:
--------------
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting
',' or ';' in /home/alhambra/www/tst/test.php on line 8
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42328&edit=1