3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "1,234,456"; $str = preg_replace('/[^0-9.]/s', '', $str); //echo $str; echo number_format(round($str , 2),3,".",',');

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.0rc40.0180.01198.97
7.3.0rc30.0200.00916.45
7.3.0beta10.0270.00312.72
7.3.0alpha10.0130.00612.64
7.2.60.0100.00316.87
7.1.200.0100.00315.86
7.1.70.0230.00316.72
7.1.60.0100.00719.82
7.1.50.0120.01216.78
7.1.00.0030.05322.38
7.0.200.0000.00716.93
7.0.140.0070.07022.08
7.0.60.0030.05019.91
7.0.50.0030.04017.78
7.0.40.0100.08320.10
7.0.30.0330.05020.21
7.0.20.0230.05320.18
7.0.10.0400.07320.02
7.0.00.0030.07320.02
5.6.280.0030.07321.06
5.6.210.0030.08720.66
5.6.200.0070.04718.21
5.6.190.0000.09320.67
5.6.180.4230.04020.31
5.6.170.0270.08320.38
5.6.160.0030.04320.71
5.6.150.0030.04718.16
5.6.140.0070.07318.12
5.6.130.0100.03718.21
5.6.120.0070.06320.96
5.6.110.0070.08721.02
5.6.100.0070.06020.98
5.6.90.0130.06721.03
5.6.80.0070.07320.38
5.6.70.0270.04020.41
5.5.350.0170.06720.37
5.5.340.0100.07718.00
5.5.330.0100.08020.40
5.5.320.0300.08020.50
5.5.310.0300.07720.19
5.5.300.0130.05317.96
5.5.290.0000.07718.00
5.5.280.0100.05320.97
5.5.270.0100.05320.63
5.5.260.0170.04320.75
5.5.250.0000.09020.54
5.5.240.0030.03720.14
5.4.450.0830.07719.61
5.4.440.0230.04719.27
5.4.430.0970.05719.60
5.4.420.0370.05019.40
5.4.410.0770.05719.48
5.4.400.0400.06718.53
5.4.390.0500.06018.53
5.4.380.0370.04718.72
5.4.370.0170.05018.52
5.4.360.0130.05018.70
5.4.350.0130.05718.63
5.4.340.0170.05318.50
5.4.320.0070.04012.46
5.4.310.0090.04312.45
5.4.300.0080.04612.45
5.4.290.0080.04512.45
5.4.280.0050.03612.35
5.4.270.0090.03812.35
5.4.260.0130.04718.79
5.4.250.0100.05018.79
5.4.240.0030.05718.99
5.4.230.0070.06318.89
5.4.220.0070.05718.76
5.4.210.0100.04718.80
5.4.200.0200.04019.01
5.4.190.0070.05318.95
5.4.180.0030.05318.75
5.4.170.0070.05318.78
5.4.160.0030.06718.69
5.4.150.0070.05319.01
5.4.140.0100.05316.45
5.4.130.0130.04016.31
5.4.120.0100.04716.36
5.4.110.0100.04716.42
5.4.100.0030.05016.37
5.4.90.0100.04716.30
5.4.80.0100.04316.48
5.4.70.0130.04316.39
5.4.60.0030.06016.27
5.4.50.0100.04716.41
5.4.40.0100.04316.52
5.4.30.0030.05016.46
5.4.20.0070.05016.23
5.4.10.0170.04016.49
5.4.00.0030.05015.76
5.3.290.0110.03612.80
5.3.280.0030.05314.37
5.3.270.0100.06314.67
5.3.260.0000.06014.66
5.3.250.0070.05014.48
5.3.240.0100.04714.45
5.3.230.0100.06314.65
5.3.220.0100.04714.34
5.3.210.0170.05014.61
5.3.200.0100.05014.61
5.3.190.0100.05714.66
5.3.180.0030.05314.54
5.3.170.0100.04714.45
5.3.160.0170.04014.63
5.3.150.0000.05714.32
5.3.140.0130.05314.62
5.3.130.0100.05014.62
5.3.120.0030.05714.44
5.3.110.0070.05314.62
5.3.100.0130.05014.09
5.3.90.0030.05313.91
5.3.80.0070.05014.09
5.3.70.0070.05014.09
5.3.60.0070.05013.86
5.3.50.0030.05313.88
5.3.40.0030.05013.86
5.3.30.0100.04013.95
5.3.20.0070.04713.61
5.3.10.0000.05313.66
5.3.00.0130.04313.65
5.2.170.0100.03711.09
5.2.160.0100.04311.37
5.2.150.0000.04311.30
5.2.140.0100.03711.33
5.2.130.0070.03711.18
5.2.120.0000.06311.05
5.2.110.0130.03011.33
5.2.100.0030.04011.11
5.2.90.0130.03311.30
5.2.80.0030.06011.15
5.2.70.0070.04011.20
5.2.60.0030.04311.00
5.2.50.0070.04011.05
5.2.40.0100.05011.18
5.2.30.0070.04311.17
5.2.20.0200.04310.97
5.2.10.0070.03711.12
5.2.00.0170.03010.75
5.1.60.0100.02710.09
5.1.50.0030.03310.31
5.1.40.0030.03310.40
5.1.30.0100.03010.49
5.1.20.0070.03710.52
5.1.10.0030.03310.04
5.1.00.0000.03710.21
5.0.50.0000.0308.88
5.0.40.0030.0278.43
5.0.30.0000.0438.48
5.0.20.0100.0208.42
5.0.10.0070.0238.38
5.0.00.0000.0438.28
4.4.90.0030.0206.83
4.4.80.0070.0176.83
4.4.70.0000.0276.83
4.4.60.0000.0236.83
4.4.50.0000.0236.83
4.4.40.0070.0306.83
4.4.30.0070.0176.83
4.4.20.0030.0206.83
4.4.10.0000.0236.83
4.4.00.0000.0336.83
4.3.110.0000.0236.83
4.3.100.0070.0176.83
4.3.90.0000.0206.83
4.3.80.0000.0336.83
4.3.70.0030.0206.83
4.3.60.0000.0206.83
4.3.50.0000.0236.83
4.3.40.0070.0276.83
4.3.30.0070.0176.83
4.3.20.0030.0206.83
4.3.10.0000.0236.83
4.3.00.0130.0236.77