42 Tips for Speeding Up PHP
optimization, PHP October 16th, 2007
Great list of tips / hacks for optimizing PHP for speed. Here are a couple that caught my eye:
- $row[’id’] is 7 times faster than $row[id]
- Incrementing an undefined local variable is 9-10 times slower than a pre-initialized one.
- In some instance you can improve the speed of your code by using an isset() trick.
Ex.
if (strlen($foo) < 5) { echo “Foo is too short”; }
vs.
if (!isset($foo{5})) { echo “Foo is too short”; }
http://webguy.antaramedia.com/blog/?p=22
Posts
October 16th, 2007 at 1:13 pm
read this article too..
http://phplens.com/lens/php-book/optimizing-debugging-php.php