3v4l.org

run code in 200+ php & hhvm versions
<?php $number = 1346.21; var_dump(round($number)); var_dump(round($number, -1)); var_dump(round($number, -2)); var_dump(round($number, -3)); var_dump(round($number, -4));
based on J9Suf

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.50.0080.00814.55
7.3.40.0080.00714.53
7.3.30.0080.00714.53
7.3.20.0120.00715.43
7.3.10.0120.00715.46
7.3.00.0110.00715.42
7.2.180.0090.00714.66
7.2.170.0090.00714.66
7.2.160.0080.00914.67
7.2.150.0140.00815.59
7.2.140.0110.00815.60
7.2.130.0130.00815.60
7.2.120.0130.00715.63
7.2.110.0120.00815.63
7.2.100.0140.00815.64
7.2.90.0130.00715.69
7.2.80.0110.00815.64
7.2.70.0120.00815.65
7.2.60.0130.00715.68
7.2.50.0120.00815.65
7.2.40.0110.00715.66
7.2.30.0110.00715.67
7.2.20.0110.00815.67
7.2.10.0130.00715.62
7.2.00.0120.00815.67
7.1.280.0140.00714.61
7.1.270.0110.00714.59
7.1.260.0100.00614.60
7.1.250.0130.00714.66
7.1.240.0140.00914.85
7.1.230.0160.00714.93
7.1.220.0150.00814.92
7.1.210.0120.01114.96
7.1.200.0220.00714.93
7.1.190.0170.00914.83
7.1.180.0150.00814.81
7.1.170.0160.01014.87
7.1.160.0160.00814.88
7.1.150.0150.00814.83
7.1.140.0150.00914.90
7.1.130.0140.00714.88
7.1.120.0220.01114.89
7.1.110.0140.00814.92
7.1.100.0180.00614.98
7.1.90.0130.00814.92
7.1.80.0160.01014.88
7.1.70.0190.00814.92
7.1.60.0140.00814.83
7.1.50.0220.00814.98
7.1.40.0110.00914.85
7.1.30.0140.00914.86
7.1.20.0130.01014.87
7.1.10.0150.00714.82
7.1.00.0130.00814.82
7.0.330.0130.00814.47
7.0.320.0200.00914.56
7.0.310.0170.00814.56
7.0.300.0170.00814.51
7.0.290.0140.00914.51
7.0.280.0160.00814.48
7.0.270.0210.00814.50
7.0.260.0130.01014.45
7.0.250.0140.00814.64
7.0.240.0220.01014.52
7.0.230.0160.01014.58
7.0.220.0140.00914.58
7.0.210.0150.00814.53
7.0.200.0160.00914.47
7.0.190.0170.01014.57
7.0.180.0140.00914.57
7.0.170.0140.01014.55
7.0.160.0140.01214.61
7.0.150.0130.00814.44
7.0.140.0150.00914.56
7.0.130.0140.00714.59
7.0.120.0170.00714.51
7.0.110.0170.01014.58
7.0.100.0200.01014.47
7.0.90.0160.00814.53
7.0.80.0170.00714.36
7.0.70.0160.00914.34
7.0.60.0150.01114.34
7.0.50.0180.00814.46
7.0.40.0160.00814.45
7.0.30.0160.00814.45
7.0.20.0150.00914.27
7.0.10.0150.00914.55
7.0.00.0250.00614.49
hhvm-3.22.00.1400.18390.37
hhvm-3.21.30.1270.17088.06
hhvm-3.21.00.1240.18088.00
hhvm-3.20.20.1220.17988.79
hhvm-3.19.20.1330.17987.90
hhvm-3.18.50.1170.17286.26
hhvm-3.18.40.1190.17486.36
hhvm-3.17.30.1110.16385.44
hhvm-3.15.40.1120.15583.27
hhvm-3.13.20.1340.14794.81
hhvm-3.12.140.1310.17993.54
hhvm-3.11.10.1250.16885.42
hhvm-3.10.10.1130.16783.00
5.6.400.0150.00914.11
5.6.390.0140.00914.12
5.6.380.0160.00914.12
5.6.370.0180.00914.13
5.6.360.0140.00914.17
5.6.350.0150.00914.13
5.6.340.0160.00914.20
5.6.330.0140.00914.01
5.6.320.0150.00914.10
5.6.310.0170.00814.07
5.6.300.0140.01014.03
5.6.290.0160.00814.21
5.6.280.0140.01014.13
5.6.270.0160.00914.10
5.6.260.0150.01014.13
5.6.250.0150.01014.08
5.6.240.0140.01214.10
5.6.230.0140.01014.11
5.6.220.0150.00714.12
5.6.210.0140.01114.13
5.6.200.0150.00914.08
5.6.190.0140.01014.13
5.6.180.0140.01014.18
5.6.170.0130.01014.11
5.6.160.0130.01114.10
5.6.150.0120.01114.15
5.6.140.0130.00914.11
5.6.130.0180.00614.11
5.6.120.0140.00914.16
5.6.110.0140.01014.13
5.6.100.0160.00914.08
5.6.90.0150.00714.01
5.6.80.0140.01014.02
5.6.70.0140.00914.05
5.6.60.0140.00913.97
5.6.50.0160.01014.07
5.6.40.0150.01114.07
5.6.30.0130.01113.99
5.6.20.0140.01114.01
5.6.10.0130.01014.02
5.6.00.0140.00914.04
5.5.380.0150.00914.05
5.5.370.0160.01014.01
5.5.360.0140.01114.05
5.5.350.0160.01014.03
5.5.340.0150.01014.07
5.5.330.0130.01213.94
5.5.320.0140.01014.02
5.5.310.0150.01014.07
5.5.300.0140.01014.06
5.5.290.0150.00914.00
5.5.280.0160.01014.06
5.5.270.0160.00814.03
5.5.260.0140.00814.06
5.5.250.0160.00814.04
5.5.240.0150.01113.96
5.5.230.0120.01013.99
5.5.220.0130.01013.90
5.5.210.0140.01013.93
5.5.200.0150.00914.00
5.5.190.0140.00814.04
5.5.180.0140.00814.06
5.5.170.0170.01013.96
5.5.160.0150.01113.84
5.5.150.0130.01113.89
5.5.140.0140.00814.04
5.5.130.0130.01013.96
5.5.120.0130.00813.92
5.5.110.0120.01113.99
5.5.100.0140.00713.92
5.5.90.0130.00913.88
5.5.80.0120.01013.86
5.5.70.0140.01114.04
5.5.60.0160.00713.96
5.5.50.0150.00913.93
5.5.40.0160.00813.96
5.5.30.0150.00913.93
5.5.20.0160.00714.00
5.5.10.0140.01113.91
5.5.00.0140.00913.91
5.4.450.0130.00510.91
5.4.440.0090.00910.97
5.4.430.0130.00410.97
5.4.420.0090.00711.04
5.4.410.0100.00810.95
5.4.400.0080.00710.91
5.4.390.0100.00610.88
5.4.380.0110.00610.93
5.4.370.0120.00610.88
5.4.360.0120.00710.88
5.4.350.0110.00610.93
5.4.340.0100.00610.86
5.4.330.0130.00610.91
5.4.320.0110.00610.91
5.4.310.0100.00610.89
5.4.300.0100.00610.89
5.4.290.0120.00610.87
5.4.280.0110.00510.93
5.4.270.0100.00610.91
5.4.260.0110.00610.85
5.4.250.0110.00610.88
5.4.240.0090.00410.91
5.4.230.0090.00710.83
5.4.220.0100.00510.90
5.4.210.0110.00710.87
5.4.200.0100.00610.84
5.4.190.0090.00710.88
5.4.180.0100.00410.93
5.4.170.0100.00610.90
5.4.160.0110.00610.88
5.4.150.0110.00610.88
5.4.140.0090.00710.96
5.4.130.0080.00710.89
5.4.120.0110.00710.88
5.4.110.0090.00710.95
5.4.100.0100.00710.88
5.4.90.0090.00710.91
5.4.80.0110.00510.89
5.4.70.0120.00710.91
5.4.60.0110.00610.88
5.4.50.0100.00710.89
5.4.40.0100.00810.90
5.4.30.0090.00710.92
5.4.20.0130.00510.93
5.4.10.0110.00710.95
5.4.00.0120.00610.90
5.3.290.0100.00610.65
5.3.280.0100.00710.57
5.3.270.0100.00610.65
5.3.260.0110.00510.66
5.3.250.0100.00510.64
5.3.240.0100.00710.54
5.3.230.0100.00610.58
5.3.220.0100.00610.58
5.3.210.0100.00510.63
5.3.200.0110.00710.59
5.3.190.0100.00610.67
5.3.180.0100.00710.60
5.3.170.0110.00610.65
5.3.160.0110.00510.68
5.3.150.0090.00610.67
5.3.140.0100.00610.65
5.3.130.0100.00610.61
5.3.120.0090.00810.61
5.3.110.0110.00610.59
5.3.100.0090.00610.68
5.3.90.0090.00510.66
5.3.80.0110.00610.53
5.3.70.0090.00710.54
5.3.60.0090.00610.62
5.3.50.0100.00410.60
5.3.40.0110.00610.60
5.3.30.0100.00610.64
5.3.20.0090.00710.58
5.3.10.0120.00410.49
5.3.00.0100.00610.49
5.2.170.0060.00610.49
5.2.160.0090.00410.49
5.2.150.0080.00510.49
5.2.140.0090.00410.49
5.2.130.0110.00410.49
5.2.120.0090.00510.49
5.2.110.0080.00510.49
5.2.100.0080.00510.49
5.2.90.0080.00410.49
5.2.80.0080.00610.49
5.2.70.0070.00610.49
5.2.60.0070.00710.49
5.2.50.0090.00510.49
5.2.40.0080.00510.49
5.2.30.0100.00410.49
5.2.20.0090.00510.49
5.2.10.0090.00410.49
5.2.00.0080.00410.49
5.1.60.0050.00510.49
5.1.50.0080.00410.49
5.1.40.0080.00410.49
5.1.30.0060.00510.49
5.1.20.0050.00410.49
5.1.10.0070.00410.49
5.1.00.0070.00410.49
5.0.50.0050.00510.49
5.0.40.0050.00510.49
5.0.30.0060.00410.49
5.0.20.0060.00310.49
5.0.10.0060.00410.49
5.0.00.0070.00310.49
4.4.90.0050.00410.49
4.4.80.0050.00410.49
4.4.70.0050.00510.49
4.4.60.0040.00410.49
4.4.50.0060.00310.49
4.4.40.0050.00310.49
4.4.30.0040.00410.49
4.4.20.0060.00210.49
4.4.10.0040.00410.49
4.4.00.0050.00410.49
4.3.110.0050.00410.49
4.3.100.0050.00410.49
4.3.90.0040.00410.49
4.3.80.0050.00410.49
4.3.70.0040.00310.49
4.3.60.0050.00210.49
4.3.50.0040.00510.49
4.3.40.0050.00310.49
4.3.30.0040.00310.49
4.3.20.0030.00410.49
4.3.10.0040.00410.49
4.3.00.0040.00410.49