News for hackers. Stuff that matters.
Re:Things You Probably Didn’t Know About PHP by RyanMcGreal on Tuesday January 12, 2010 @10:28AM (#1047640)
>7. You can handle the situation when a class that doesn’t exist is instantiated

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?

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.)
Re:Things You Probably Didn’t Know About PHP by pbhjpbhj on Tuesday January 12, 2010 @10:51AM (#1047698)
I could perhaps see it as a debugging tool, a way to catch the name and line number of a class typo?