Empty string comparison to zero gives different result in PHP 8 than in previous versions

前端 未结 0 1586
小蘑菇
小蘑菇 2021-02-03 17:45

This code gives a different result in PHP 8 than in all previous versions of PHP:

if (\'\' == 0)
  echo \'PHP \'.phpversion().\' says yes\';
else
  echo \'PHP \'.         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题