php 01==1?
斜上方45度
斜上方45度 2021-06-15 08:53:08
0
2
1091

php 01 ==1?

var_dump(in_array('01',array('1'))); // true

Can the boss explain it?

斜上方45度
斜上方45度

reply all (2)
Li_ [Xin]

01 == 1 Because if in_array does not add a third parameter to force the type, this is a weak type comparison. 01 is naturally equal to 1. If the force type is string 01 is not equal to string 1

    Peter_Zhu

    What kind of function do you want to achieve?

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!