echo is faster than print.
echo は print より速い。
If you need to find out the time when the script started executing, $_SERVER['REQUEST_TIME'] is preferred to time()
スクリプトが実行されはじめる時間を取得したいなら、$_SERVER['REQUEST_TIME']の方がtime()よりよいですよ。
Unset your variables to free memory, especially large arrays.
特に大きな配列の場合は、メモリを開放するために変数をunsetしよう。
Error suppression with @ is very slow.
「@」でエラーを抑制するのはとても処理が遅くなるよ。
Close your database connections when you're done with them.
データベースの処理が終わったらコネクションをクローズしよう。
$row['id'] is 7 times faster than $row[id].
$row['id'] は $row[id] より7倍速い。
Your PHP scripts are recompiled every time unless the scripts are cached. Install a PHP caching product to typically increase performance by 25-100% by removing compile times.
スクリプトがキャッシュされない場合、毎回再コンパイルされちゃいます。通常、PHPをキャッシュする製品をインストールすると、コンパイル回数を減らせて、25〜100%くらい性能が上がります。
Don't split methods too much, think, which code you will really re-use .
メソッドを沢山分けすぎないでください。そのコードはホントに再利用しますか?
Turn on apache's mod_deflate.
apacheの mod_deflate を有効にしましょう。
See if you can use strncasecmp, strpbrk and stripos instead of regex.
regexの代わりに strncasecmp , strpbrk , stripos を使えないかどうかを確認しましょう。
難しいのう。
更に見たい場合は 40 Tips for optimizing your php Code でみてちょうだい。