3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_num('.11e2'); var_dump('11e0' == '.11e2'); var_dump('11e0' == '.011e3'); var_dump('1.1e1' == '.11e2'); echo ".11e2 = ", 0 + '.11e2', "\n"; echo "1.1e1 = ", 0 + '1.1e1', "\n"; function print_num() { $args = func_get_args(); foreach ($args as $str) { $num = 0 + $str; $num2 = $str + 0; if ($num <> $num2) {echo "MASSIVE ERROR!! Ignoring..."; } echo "$str = $num\n"; } }

preferences:
64.27 ms | 402 KiB | 5 Q