3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function abreviateTotalCount($value) { $abbreviations = array(12 => 'T', 9 => 'B', 6 => 'M', 3 => 'K', 0 => ''); foreach($abbreviations as $exponent => $abbreviation) { if($value >= pow(10, $exponent)) { return round(floatval($value / pow(10, $exponent)),2).$abbreviation; } } } echo abreviateTotalCount(10034);

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.2.80.0040.00816.68
7.2.00.0000.01219.48
7.1.200.0000.01115.87
7.1.100.0000.01218.10
7.1.70.0040.00417.30
7.1.60.0200.00319.70
7.1.50.0130.01016.77
7.1.00.0070.07322.45
7.0.200.0000.00816.63
7.0.140.0000.07322.09
7.0.60.0100.08019.93
7.0.50.0030.05017.73
7.0.40.0100.08720.11
7.0.30.0300.08020.09
7.0.20.0230.05320.12
7.0.10.0130.08020.08
7.0.00.0070.05320.22
5.6.210.0130.05320.71
5.6.200.0100.04018.19
5.6.190.0100.08020.66
5.6.180.0330.04320.39
5.6.170.0200.06320.61
5.6.160.0030.04320.48
5.6.150.0030.04018.16
5.6.140.0000.05318.18
5.6.130.0070.04718.28
5.6.120.0170.07021.20
5.6.110.0070.05320.98
5.6.100.0030.04321.01
5.6.90.0030.05720.97
5.6.80.0070.04720.36
5.5.350.0170.07720.41
5.5.340.0070.07717.95
5.5.330.0100.05020.31
5.5.320.0000.04320.41
5.5.310.0330.05720.34
5.5.300.0070.07717.99
5.5.290.0100.07718.09
5.5.280.0100.07720.73
5.5.270.0030.04020.76
5.5.260.0130.07720.89
5.5.250.0100.08320.69
5.5.240.3770.03020.04
5.4.450.0200.05719.46
5.4.440.0300.05719.57
5.4.430.0170.05319.61
5.4.420.0200.04019.45
5.4.410.0370.04319.05
5.4.400.0230.07319.24
5.4.390.0270.06319.22
5.4.380.0200.04019.24
5.4.370.0200.07719.29
5.4.360.0200.06319.24
5.4.350.0230.05019.09
5.4.340.0270.05019.06
5.4.320.0170.07019.23
5.4.310.0330.06719.26
5.4.300.0200.04319.24
5.4.290.0300.06319.06
5.4.280.0170.03319.06
5.4.270.0100.04019.26
5.4.260.0100.04018.87
5.4.250.0130.03719.21
5.4.240.0170.04019.23
5.4.230.0170.04018.87
5.4.220.0100.04019.08
5.4.210.0200.05019.27
5.4.200.0100.04019.37
5.4.190.0170.04018.86
5.4.180.0130.03719.28
5.4.170.0170.03319.12
5.4.160.0170.03319.21
5.4.150.0130.04019.04
5.4.140.0130.03716.62
5.4.130.0170.03716.37
5.4.120.0100.03716.38
5.4.110.0170.03316.33
5.4.100.0170.03316.64
5.4.90.0100.04016.51
5.4.80.0130.03716.66
5.4.70.0070.04016.30
5.4.60.0130.03316.53
5.4.50.0100.03716.43
5.4.40.0130.03716.51
5.4.30.0270.04316.24
5.4.20.0270.06016.23
5.4.10.0200.07316.41
5.4.00.0430.06315.86
5.3.290.0230.07714.66
5.3.280.0130.03714.63
5.3.270.0170.04714.57
5.3.260.0100.04014.77
5.3.250.0130.04014.57
5.3.240.0170.03714.82
5.3.230.0200.03714.57
5.3.220.0170.03314.61
5.3.210.0130.03714.55
5.3.200.0070.04314.54
5.3.190.0130.03714.54
5.3.180.0130.04014.58
5.3.170.0070.04314.56
5.3.160.0070.05014.54
5.3.150.0130.03714.69
5.3.140.0130.04014.53
5.3.130.0270.04714.70
5.3.120.0270.06714.54
5.3.110.0170.07314.52
5.3.100.0200.04014.02
5.3.90.0230.03314.00
5.3.80.0170.04314.24
5.3.70.0300.06314.07
5.3.60.0270.05313.92
5.3.50.0270.06713.95
5.3.40.0200.07313.89
5.3.30.0230.07014.13
5.3.20.0270.07013.89
5.3.10.0170.05013.89
5.3.00.0170.05013.89
5.2.170.0200.05313.89
5.2.160.0130.05313.89
5.2.150.0230.05713.89
5.2.140.0230.02713.89
5.2.130.0130.03713.89
5.2.120.0230.05013.89
5.2.110.0200.06313.89
5.2.100.0130.06713.89
5.2.90.0200.05713.89
5.2.80.0230.04313.89
5.2.70.0170.05313.89
5.2.60.0170.04713.89
5.2.50.0200.06013.89
5.2.40.0130.04313.89
5.2.30.0070.05713.89
5.2.20.0300.03713.89
5.2.10.0270.03713.89
5.2.00.0100.03313.89
5.1.60.0070.03013.89
5.1.50.0130.03013.89
5.1.40.0130.03013.89
5.1.30.0130.03013.89
5.1.20.0270.05013.89
5.1.10.0200.02313.89
5.1.00.0170.03013.89
5.0.50.0100.04313.89
5.0.40.0070.04313.89
5.0.30.0070.06013.89
5.0.20.0100.04313.89
5.0.10.0100.03713.89
5.0.00.0070.06713.89
4.4.90.0100.03313.89
4.4.80.0030.02313.89
4.4.70.0230.01713.89
4.4.60.0100.02713.89
4.4.50.0070.02313.89
4.4.40.0070.03013.89
4.4.30.0100.01313.89
4.4.20.0070.01713.89
4.4.10.0070.04013.89
4.4.00.0070.02713.89
4.3.110.0100.02013.89
4.3.100.0070.03313.89
4.3.90.0030.03713.89
4.3.80.0100.05013.89
4.3.70.0070.02013.89
4.3.60.0030.01713.89
4.3.50.0070.03313.89
4.3.40.0070.03313.89
4.3.30.0030.04013.89
4.3.20.0070.03713.89
4.3.10.0030.03713.89
4.3.00.0030.03013.89