[ create a new paste ] login | about

Link: http://codepad.org/tUKziMSi    [ raw code | output | fork ]

PHP, pasted on May 24:
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);

?>


Output:
1
2
is_int($not_int): 
is_int($int): 1


Create a new paste based on this one


Comments: