[pLog-svn] The use of constants
Tsz Ming WONG
tszming at gmail.com
Mon Apr 23 05:41:12 EDT 2007
I have just run a simple xdebug profiling on the LT blog index (1.2.1)
Function, Total Self, Total Cum, Calls
php::define, 1.9ms, 1.9ms, 300
lt_include, 270ms, 805ms, 134
in fact, not that slow as you mentioned...do you have any figures?
best regards,
tszming
On 4/23/07, Ammar Ibrahim <ammar.ibrahim at gmail.com> wrote:
>
>
> On 4/23/07, Tsz Ming WONG <tszming at gmail.com> wrote:
> > 1. if you don't use constant, what will you use? hard code them into the
> codes?
>
> Global variables, or in PHP5 static class variables.
>
> > 2. the real slow down is include_once() AFAIK
>
> true, this is a slow down as well. In my profiling tests. include_once took
> so much time, but less than define()
More information about the pLog-svn
mailing list