Re: loading classes and efficiency

From: Date: Thu, 11 Sep 2003 00:17:45 +0000
Subject: Re: loading classes and efficiency
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-162228@lists.php.net to get a copy of this message
On Wed, 2003-09-10 at 17:58, daniel@electroteque.org wrote: > Hi there i was wondering is it more efficient to load class files and > objects when needed per page or is it ok to include them in my main include > file ? It might be fine. If the class files are not that large, there might not be much difference in performance. If you use a consistent naming convention for your class files, you could have a function that will handle including the class file and return an object. So you could do something like: $foo_object = CreateObject('FooObject'); - Brad

« previous php.general (#162228) next »