[nycphp-talk] PHP 5.3 / Namespaces
Jon Baer
jonbaer at jonbaer.com
Sat Sep 29 19:29:15 EDT 2007
So according to a few (kinda old) blogs, etc, in 5.3 we should be
able to accomplish something like this (correct me if Im wrong, Ive
only poked through latest php-src):
<?php
import MyCoolLibrary as MCL;
echo MCL::Version;
?>
Just curious, does importing again as MCL create a stack or does it
throw an exception? If it is stacked this would give you a mixin
like capability wouldn't it?
Either way I'd think it was possible if this is true:
6) Calls to qualified functions are resolved at run-time. Call to
A::B::foo() first tries to call function foo() from namespace A::B, then
it tries to find class A::B (__autoload() it if necessary) and call its
static method foo()
- Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070929/00e6d2a6/attachment.html>
More information about the talk
mailing list