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 ...
php.net