#43126 [Opn->Csd]: Unexpected T_STATIC in parser error

From: Date: Sun, 11 Nov 2007 22:14:06 +0000
Subject: #43126 [Opn->Csd]: Unexpected T_STATIC in parser error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-119472@lists.php.net to get a copy of this message
ID: 43126 Updated by: johannes@php.net Reported By: felipe@php.net -Status: Open +Status: Closed Bug Type: Scripting Engine problem PHP Version: 5.3CVS-2007-10-29 (snap) New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. I've committed Etienne's patch Previous Comments: ------------------------------------------------------------------------ [2007-10-29 12:39:45] felipe@php.net Description: ------------ The parser error said: "expecting ... T_STATIC" in class and interface declarations when used keywords in 'extends' or 'implements'. Eg. extends use extends import extends namespace extends extends extends class With 'extends static' show: Fatal error: Cannot use 'static' as class name as it is reserved in ... Reproduce code: --------------- class foo extends namespace { } Expected result: ---------------- Parse error: syntax error, unexpected T_NAMESPACE, expecting T_STRING or T_PAAMAYIM_NEKUDOTAYIM Actual result: -------------- Parse error: syntax error, unexpected T_NAMESPACE, expecting T_STRING or T_STATIC or T_PAAMAYIM_NEKUDOTAYIM ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43126&edit=1

« previous php.bugs (#119472) next »