Integer Non-silent Conversion¶
When a string is converted into a integer, with problems, the notice was upgraded to a Warning. This raised level may end up filling logs.
This applies to all mathematical operations, such as multiplication, divisions, modulo, exponent, etc.
PHP code¶
<?php
print $a = 1 + '3a';
?>
Before¶
PHP Notice: A non well formed numeric value encountered
Notice: A non well formed numeric value encountered
4
After¶
PHP Warning: A non-numeric value encountered
Warning: A non-numeric value encountered
4
PHP version change¶
This behavior changed in 8.0