Bug #52410 [Opn]: Namespaces affects existing code after upgrade
| From: | felipe@php.net | Date: | Thu, 22 Jul 2010 22:21:06 +0000 |
| Subject: | Bug #52410 [Opn]: Namespaces affects existing code after upgrade | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-4727@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52410&edit=1
ID: 52410
Updated by: felipe@php.net
Reported by: bugs dot php dot net at rootwerk dot de
Summary: Namespaces affects existing code after upgrade
Status: Open
Type: Bug
-Package: Class/Object related
+Package: Documentation problem
Operating System: Ubuntu 10.04
PHP Version: 5.2.14
New Comment:
In the end of http://docs.php.net/manual/en/migration53.incompatible.php
page are mentioned the new keywords introduced in 5.3.
But yes, the FAQ. needs an update to state this point.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2010-07-22 23:49:19] bugs dot php dot net at rootwerk dot de
Description:
------------
After upgradeing from php 5.2.4 to 5.3.2 (with ubuntu 10.4), the
following code won't work:
<?PHP
class namespace extends something {
}
?>
The error message: PHP Parse error: syntax error, unexpected
T_NAMESPACE, expecting T_STRING in ...
The documentation says:
Q: If I don't use namespaces, should I care about any of this?
A: No. Namespaces do not affect any existing code in any way
( http://www.php.net/manual/en/language.namespaces.faq.php
)
Test script:
---------------
<?PHP
class namespace extends something {
}
?>
Expected result:
----------------
in this case, I won't define a php-namespace, but a functionality within
my application, which was called so before namespaces existed in php.
Actual result:
--------------
PHP Parse error: syntax error, unexpected T_NAMESPACE, expecting
T_STRING in ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52410&edit=1