优化PHP代码的40条建议
1.如果一个方法可静态化,就对它做静态声明。速率可提升至4倍。
2.echo 比 print 快。
3.使用echo的多重参数(译注:指用逗号而不是句点)代替字符串连接。
种瓜得瓜,种豆得豆;一份耕耘,一份收获
1.如果一个方法可静态化,就对它做静态声明。速率可提升至4倍。
2.echo 比 print 快。
3.使用echo的多重参数(译注:指用逗号而不是句点)代替字符串连接。
public function csubstr($str, $start=0, $length, $charset=”utf-8″, $suffix=true)
决定本周将http://jibbering.com/faq/faq_notes/closures.html 翻译出来