what returns when comparing string value with integer 0 in php?

57 阅读1分钟

guess what will return after executing below code,

<?php
var_dump("CFT6G3CBXTKT35Q797UB"==0);
bool(true)

How amazing! Why? Because when compare string with integer value in php, the string will be casted to integer type, intval("CFT6G3CBXTKT35Q797UB") returns 0.