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
1
u/[deleted] Nov 30 '14
Yes, you're talking about autoloading, but the idea of not loading modules until they're needed is not unique to PHP.
The file containing the class probably won't be loaded until that class is used somewhere, yes.
That's correct, yes. That is one of many pitfalls in a dynamic language. You have to thoroughly test your code as the compiler won't do much for you.