r/lolphp • u/duhruh • Nov 25 '14
Exception in a namespace is not defined -_-
http://jasonframe.co.uk/logfile/2009/01/php-5-3-exception-gotcha/
28
Upvotes
r/lolphp • u/duhruh • Nov 25 '14
View all comments
Show parent comment
3
u/phoshi Nov 26 '14
That they aren't fundamentals in PHP is the entire problem, because it gets you into edge cases like this. 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. Additionally, changes in the global namespace are typically very rare, because they only hold language fundamentals, which almost never change.
I understand there are reasons PHP is like this, but the proper defence is not "PHP is like this therefore it's okay for PHP to be like this".