What is the recommended error_reporting() setting for development? What about E_STRICT?

前端 未结 8 1580
醉梦人生
醉梦人生 2020-12-06 04:29

Typically I use E_ALL to see anything that PHP might say about my code to try and improve it.

I just noticed a error constant E_STRICT, but

8条回答
  •  醉酒成梦
    2020-12-06 04:41

    Use the following in php.ini:

    error_reporting = E_ALL | E_STRICT
    

    Also you should install Xdebug, it can highlight your errors in blinding bright colors and print useful detailed information.

    Never let any error or notice in your code, even if it's harmless.

提交回复
热议问题