Is this php behaviour explained somewhere in manual? (strings with zeroes comparison)

前端 未结 5 1091
后悔当初
后悔当初 2020-12-22 01:03

Why for php

\'00\' == \'0000\'

expression is true?

Is it explained somewhere in manual?

NOTE:

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-22 01:47

    "If you compare a number with a string or the comparison involves numerical strings, then each string is converted to a number and the comparison performed numerically." (PHP manual)

提交回复
热议问题