Comparison of php string and 0

problem description

string is compared with 0, and there is a problem with 0 at the end of the string.

the environmental background of the problems and what methods you have tried

data link: https://codeshelper.com/q/10...

related codes

var_dump ("ce0263c0-14af-11e9-9cc3-8fdc6a798350" = = 0); / / true
var_dump (is_numeric (" ce0263c0-14af-11e9-9cc3-8fdc6a798350"); / / false

what result do you expect? What is the error message actually seen?

shouldn"t the result of the first var_dump () be false?

Php
Jun.20,2022

string and number comparison,

= = ignore type

can be equivalent to

intval('ce0263c0-14af-11e9-9cc3-8fdc6a798350') == 0
Menu