Why does PHP report Warning instead of Notice? when accessing undefined constants?

I think the title can clearly express what I mean. What I see on the server is a warning, while my local PHP is a notification. According to the instructions in the official manual, accessing undefined constants should report a notification-level error. What is the difference between which version of PHP? what is the reason for causing the server to report a warning? Can you set it?

Php
Apr.06,2021
The version of

php7 begins to report warning


PHP7.2 version begins: strings without quotation marks are global constants that do not exist and are converted to their own strings. In the past, this behavior would have generated E_WARNING, but now it would. In the next major version of PHP, an Error exception will be thrown.

http://php.net/manual/zh/migr.

< hr >

the following are wrong:
this is configured in php.ini: error_reporting
http://php.net/manual/zh/erro.

Menu