[ phpeclipse-Bugs-1231000 ] Static variables as class names should not be an error
"SourceForge.net" <[email protected]> Thu, 10 May 2007 23:17:55 -0700
| Newsgroups | gmane.comp.ide.eclipse.phpeclipse.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1231000, was opened at 2005-07-01 12:07
Message generated for change (Comment added) made by scorphus
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=484801&aid=1231000&group_id=57621
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: PHP Parser
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Static variables as class names should not be an error
Initial Comment:
PHP allows static variables to be used as class names
with "new" but the parser flags the "::" as an error:
class Config {
public static $which = 'Logger';
}
class Logger {
public function __construct() {
print 'Hello, World';
}
}
$logger = new Config::$which();
This is valid but the parser says:
Parser error "';' expected after expression (Found
token not-a-token(63) ::)"
I am using PHPEclipse 1.1.4.
E-mail address: [email protected]
----------------------------------------------------------------------
>Comment By: Pablo Aguiar (scorphus)
Date: 2007-05-11 03:17
Message:
Logged In: YES
user_id=987242
Originator: NO
This issue is fixed in 1.1.9 and since then closed.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=484801&aid=1231000&group_id=57621
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/