note 114286 deleted from language.namespaces by sobak
| From: | sobak@php.net | Date: | Tue, 22 Nov 2016 08:22:53 +0000 |
| Subject: | note 114286 deleted from language.namespaces by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207478@lists.php.net to get a copy of this message | ||
Note Submitter: php at lanar dot com dot au
----
Be warned that it is not trivial to convert a project to use namespaces. If you add the same
namespace to the top of all your files, your application will break.
All objects in the global namespace, such as ArrayObject, must have a backslash (\) prepend to them.
If you use get_class() and instanceof, you will have to make adjustments here to.
If you have an autoloader, you will need to change its behavior.
It can be done, but subtle errors can creep in and are tedious to rectify.