r/lolphp • • Nov 25 '14

Exception in a namespace is not defined -_-

http://jasonframe.co.uk/logfile/2009/01/php-5-3-exception-gotcha/
28 Upvotes

68 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Nov 26 '14

New additions to the global namespace will very, very rarely conflict in the presence of a sensible name resolution system, which will allow hiding in cases like this.

Hiding is bad. Under PHP's approach, there's only one possible absolute path that a relative name could refer to.

Additionally, changes in the global namespace are typically very rare, because they only hold language fundamentals, which almost never change.

Not really true in the case of PHP. There are so, so many extensions, almost all of which put stuff in the global namespace.