Source Code:
(back to article)
<?php $var1 = "42"; $var2 = 3.14; $var3 = "hello"; echo is_numeric($var1) . "\n"; // output: 1 (true) echo is_numeric($var2) . "\n"; // output: 1 (true) echo is_numeric($var3) . "\n"; // output: (false) ?>
Result:
Report an issue