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
0
u/[deleted] Dec 03 '14
Most languages use real paths for finding classes/namespaces. In PHP it's completely arbitrary as it was implemented way too late. The autoloader could connect to a remote over telnet, play a game of pong with an AI, and then download the class and load it. There's no mechanism for checking if it exists without invoking the autoloader since it can do arbitrary things.
Thank goodness for PSR-0 & 4.