Re:Things You Probably Didn’t Know About PHP
by shaunxcode on Tuesday January 12, 2010 @11:20AM
(#1047784)
This is actually how frameworks like Zend require_once the file which DOES contain the class definition (and thus the ugly class names i.e. Zend_Db_Table_Row etc. that correspond to the actual directory structure). With proper namespaces most of this should go away.
Re:Things You Probably Didn’t Know About PHP
by Jach on Tuesday January 12, 2010 @12:14PM
(#1047941)
Laziness. When your web app is class-driven and you generally have need of many different classes, it's annoying to have to include them every time you want them. (And a sin to include all of them when you won't need them.)
I'm not a PHP programmer so maybe I just don't get it ... but why would you ever want to instantiate a class that doesn't exist?