Just a shorter way to check if your variable is an int or a string containing a int without others digit than 0 to 9 :
<?php
$bool = ( !is_int($value) ? (ctype_digit($value)) : true );
$value = 42; //true
$value = '42'; //true
$value = '1e9'; //false
$value = '0155'; //true
$value = 0155; //true
$value = 0xFF; //true while it's just the same as 255
$value = '0xFF'; //false
$value = 'a'; //false
$value = array(); //false
$value = array('5'); //false
$value = array(5); false
$value = ''; //false
$value = NULL; //false
?>
Short & cool :)