Does php run faster without warnings?

后端 未结 3 1332
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-04 17:42

Since PHP code will run just fine even if it\'s riddled with warnings and notices about undefined indexes and non-static methods being called as static, etc, the question is

3条回答
  •  眼角桃花
    2020-12-04 18:15

    I wouldn't quite call it a "significant" improvement for most cases, but running code that does not generate errors of any sort naturally runs faster than code that has to generate a stack trace every other line.

    Check out: http://www.noamdesign.com/Web-Design-Blog/15-tips-to-optimizing-your-php-code/ for more information on minor optimizations you can make to your code.

    In my own experience, I've found that 95% of code optimization usually deals with how you use your database.

提交回复
热议问题