is_float(2.1); TRUE
is_real(2.1); TRUE
is_int(2.1); FALSE
is_float(2); FALSE
is_real(2); FALSE
is_int(2); TRUE
is_float(2.0); TRUE
is_real(2.0); TRUE
is_int(2.0); FALSE
<html><head>
<title>Testing types</title>
</head>
<body><?php
$testArray = array (
'is_float(2.1);',
'is_real(2.1);',
'is_int(2.1);',
'is_float(2);',
'is_real(2);',
'is_int(2);',
'is_float(2.0);',
'is_real(2.0);',
'is_int(2.0);'
);
foreach ($testArray as $test)
print $test." ".(eval("return ".$test) ? 'TRUE' : "FALSE")."<br />\n";
?>
<div style="border: 1px solid black; padding: .5em; margin-top: 1em;">
<?php
highlight_file(__FILE__);
?>
</div>
</body>
</html>