3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "1,234,456.0987"; $strs = preg_replace('/[^0-9.]/s', '', $str); $str=number_format($str, 2, '.', ',') echo $str; //echo round($str , 2);
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected 'echo' (T_ECHO) in /in/9UHlh on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ECHO in /in/9UHlh on line 5
Process exited with code 255.

preferences:
173.51 ms | 1395 KiB | 63 Q