string compare int value trap in php

If string compare with an integer, php will evaluate string to integer intval() and compare it with that integer.

php

if('test' != 0) {    echo "true";} else {    echo "false"; // return false}if('0test' != 0) {    echo "true";} else {    echo "false"; // return false}if('1test' != 0) {    echo "true"; // return true} else {    echo "false";}