Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Error (but it let me throw the script) on using $variable::method
Error (but it let me throw the script) on using $variable::method [message #551625] Sun, 08 August 2010 12:41
john  is currently offline john Friend
Messages: 2
Registered: August 2010
Junior Member

I have downloaded the last PDT (all in one package) and I have installed PHP 5.3.1.

I am trying to do the following:
class MyClass {
    const CONST_VALUE = 'A constant value';

$classname = 'MyClass';
echo $classname::CONST_VALUE; // As of PHP 5.3.0

echo MyClass::CONST_VALUE;

And I get the classical red cross with an error at line "echo MyClass::CONST_VALUE. It says unexpected ::. However, when I launch the script, it works.

Why Eclipse show me that error, if apparently in PHP 5.3, this is totally allowed?

Thanks in advance.
Previous Topic:Happy about coding again
Next Topic:Breakpoints only working on first pass
Goto Forum:

Current Time: Mon May 21 07:23:37 GMT 2018

Powered by FUDForum. Page generated in 0.01758 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top