Posts Tagged “is_int”

PHP is_numeric() vs is_int()

Some lessons you don’t forget, but this one I did because it doesn’t come up very often. Don’t use is_int() because, as Jeremy says, it’ll lie to you. Use is_numeric() instead. Copy the following chunk of code into a php file and run it. You’ll be surprised at the outcome: $t = “12345″; if( is_int($t [...]

Read more »



Holy Shmoly! is Stephen Fry proof thanks to caching by WP Super Cache