1 2 3 4 5 6 7 8 9 10 11 12 13
<?php $not_int = "051101"; echo 'is_int($not_int): ' . is_int($not_int); echo "\n"; $int = (int) "051101"; // Note the preceding (int) echo 'is_int($int): ' . is_int($int); ?>
1 2
is_int($not_int): is_int($int): 1