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

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

Why for php

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

expression is true?

Is it explained somewhere in manual?

NOTE:

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-22 02:06

    Because when you compare this strings they become zeros on both sides so 0 == 0 is true, try to use '00' === '0000' here is link

提交回复
热议问题