error_reporting(E_ALL) does not produce error

前端 未结 6 644
一整个雨季
一整个雨季 2020-11-30 05:18

This is my php script-

 \' ;. $thisdoesnotexist);
?>

Which obviously should

6条回答
  •  余生分开走
    2020-11-30 06:07

    That error is a parse error. The parser is throwing it while going through the code, trying to understand it. No code is being executed yet in the parsing stage. Because of that it hasn't yet executed the error_reporting line, therefore the error reporting settings aren't changed yet.

    You cannot change error reporting settings (or really, do anything) in a file with syntax errors.

提交回复
热议问题