if(0 == '%') echo “WTF, Php, why can't you compare things sanely?”

后端 未结 5 726
灰色年华
灰色年华 2021-01-13 03:31

I just reduced a crazy bug to what\'s in the title of this question. I\'m sure there\'s a Perfectly Reasonable Explanation for why Php thinks that 0 == \'%\' (or any other s

5条回答
  •  有刺的猬
    2021-01-13 04:04

    since '%' isn't true, it ought to be false (0), so of course 0=='%'

    ;-) funny though

提交回复
热议问题