On Mon, 14 Mar 2005 23:30:51 +0000, Alister Bulman <abulman@xxxxxxxxx> wrote: > On Mon, 14 Mar 2005 19:14:37 +0530, Zareef Ahmed <zareef.ahmed@xxxxxxxxx> wrote: > > Hi All, > > > > I have a function to load the classes and return the object. > > > > function LoadClass($ClassName) > > { > > require_once("Class.$ClassName.inc"); > > return new $ClassName(); > > } > > With it being a require, won't it always be loaded, whether > theLoadClass functon is called or not? 'Include/include_once' loads > on demand, but right now thats effectively the same as > require_once("Class.$ClassName.inc"); > function LoadClass($ClassName) { > return new $ClassName(); > } > isn't it? > QUOTE From PHP Documentation at php.net "require() and include() are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error." "NOTE: This function changed how it worked. In PHP 3 this behaved very differently than it does on PHP 4................................" http://in.php.net/require/ Zareef Ahmed -- Zareef Ahmed :: A PHP Developer in India ( Delhi ) Homepage :: http://www.zareef.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php