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"; } if('0test' != 0) { echo "true"; } else { echo "false"; } if('1test' != 0) { echo "true"; } else { echo "false"; }
|
近期评论