note 105866 deleted from language.namespaces.definition by danbrown
| From: | danbrown@php.net | Date: | Tue, 20 Sep 2011 23:35:03 +0000 |
| Subject: | note 105866 deleted from language.namespaces.definition by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-183324@lists.php.net to get a copy of this message | ||
Note Submitter: adam at adamhahn dot com
----
In addition to what was said by jeremeamia, namespaces seem to have the same naming constraints as
PHP classes.
(http://us2.php.net/manual/en/language.oop5.basic.php)
<?php
namespace _abc; // valid
namespace abc; // valid
namespace abc123; // valid
namespace a\b\c; // valid
namespace 123abc; // invalid, can't start with number
namespace abc\123; // invalid, sub-namespaces cant start with numbers either
namespace function; // invalid, predefined keyword
?>