Numeric values of error reporting levels

后端 未结 6 637
孤独总比滥情好
孤独总比滥情好 2020-12-24 09:14

I\'m checking the configuration of my PHP server and I need to set the following parameter as follows:

error_reporting set to E_ALL & ~E_NOTICE

6条回答
  •  感情败类
    2020-12-24 09:55

    From the page we have:

    • E_ALL has the value 30719 in PHP 5.3.x, 6143 in PHP 5.2.x, 2047 previously

    • E_NOTICE has the value 8

    Looks like you are using PHP 5.2.x

    Now If you do E_ALL & ~E_NOTICE Which is bitwise complement of E_NOTICE followed by bitwise anding with E_ALL we get

    6143 & (~8) = 6135
    

提交回复
热议问题