note 117043 deleted from language.namespaces by tularis
| From: | tularis@php.net | Date: | Tue, 07 Apr 2015 11:34:34 +0000 |
| Subject: | note 117043 deleted from language.namespaces by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-202192@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
> Strange, it worked only when I removed the backslash before feline.
> So like this is OK : echo feline\Cat::says()
Yes it's normal feline is an "alias" it's not registered on the global
namespace, so
<?php
use foo as feline;
echo feline\Cat::says();
// or
echo \foo\Cat::says();
?>