History has shown
us that breaking code (e.g. PHP4 - PHP5) slows adoption of new
versions.

Bad example as PHP4 > 5 broke existing code. No existing code has namespaces in it. Anyway:

----------------

A yet another compromise is possible as the lesser evil:

Resolution for classes:

namespace Foo;
new Bar();

1) Try to find class Foo\Bar.
2) Try to autoload class Foo\Bar.
3) Try to fallback to global *internal or user* class Bar + E_NOTICE;

namespace Foo;
$result = bar();

1) Try to find function Foo\bar().
2) Try to fallback to global *internal or user* function bar().

They key change is: not to make difference between internal and user global functions, just fall back to global ones, so that there's no additional confusion among drop-in replacements, user resources, and internal resources.

Send feedback. Thanks.

Stan Vassilev

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to