ID:               36221
 User updated by:  david at tulloh dot id dot au
 Reported By:      david at tulloh dot id dot au
 Status:           Closed
 Bug Type:         Feature/Change Request
 Operating System: *
 PHP Version:      5.*
 Assigned To:      helly
 New Comment:

excellent, thankyou


Previous Comments:
------------------------------------------------------------------------

[2006-02-01 01:21:31] [EMAIL PROTECTED]

Use 'self' instead:

php -r 'class t{static function f(){ var_dump(new self);}} t::f();'

------------------------------------------------------------------------

[2006-01-31 08:18:17] david at tulloh dot id dot au

Description:
------------
It would be nice if, $object = new __CLASS__(); was supported.

Currently this throws a parse/syntax error, 
Parse error: syntax error, unexpected T_CLASS_C, expecting T_STRING or
T_VARIABLE or '$' in ...

This does work as expected,
$foo = __CLASS__;
$object = new $foo();



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36221&edit=1

Reply via email to