[development] some performance notes
Chris Johnson
chris at tinpixel.com
Fri Dec 9 19:39:22 UTC 2005
Karoly Negyesi wrote:
> A while ago webchick pointed out
> http://www.php.lt/benchmark/phpbench.php this site for me.
>
> The most striking difference is using in_array on a non-set variable.
> core has 118 in_array calls :) some wanna check them?
How about we come to a consensus on the right way to treat these calls before
I roll a patch against 31 core files.
My first suggestion is this:
1. If the is_array() is checking something that might not be set, I change
the code to say "isSet() && is_array()".
2. If the code is obviously checking something that will always be set, I
leave it alone.
Any other possibilities?
Or should I just change them all to be like #1 to future-proof the code?
..chrisxj
More information about the development
mailing list