Source Code:
(back to article)
<?php $var1 = "10"; $var2 = "Hello"; if (is_long(intval($var1))) { echo "$var1 is an integer"; } else { echo "$var1 is not an integer"; } if (is_long(intval($var2))) { echo "$var2 is an integer"; } else { echo "$var2 is not an integer"; }
Result:
Report an issue