Re: require_once vs. no require_once - please read, critical information

From: Date: Mon, 24 Sep 2007 10:14:29 +0000
Subject: Re: require_once vs. no require_once - please read, critical information
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-48153@lists.php.net to get a copy of this message
Gregory Beaver wrote:
Comparing the two ways, I can draw three conclusions: 1) the number of steps required to locate HTML_Common is the same number (5) between require_once/autoload 2) in require_once, a user without knowledge that HTML/Common.php = HTML_Common class is likely to be stuck 3) with autoload, a user who does not use autoload is likely to find the missing dependency, but unlikely to understand how to enable it, and even less likely to be able to understand anything about programming.
It should also be mentioned that using __autoload() enables us to provide a helper method that provides additional information. This is what I was trying to preach with the flexibility mantra. We can provide a nice helper with error messages that clearly tell you the next steps. The user can send himself an SMS. The user can create the class on the fly and handle things even more gracefully if they so choose. Heck, they could even install the page and then move on at runtime ;) regards, Lukas

« previous php.pear.dev (#48153) next »