3v4l.org

run code in 300+ PHP versions simultaneously
<?php function human_filesize($bytes, $decimals) {   $sz='BKMGTP';   $factor = floor((strlen($bytes) - 1) / 3);   return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . $sz[$factor]; } echo human_filesize('100'); ?>

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).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.320.4100.04319.02
5.4.310.3970.03018.95
5.4.300.3730.04019.14
5.4.290.3400.03719.06
5.4.280.3130.04019.15
5.4.270.3870.03719.08
5.4.260.4200.04718.88
5.4.250.4170.03719.23
5.4.240.4070.04018.97
5.4.230.3730.04318.99
5.4.220.3270.03719.08
5.4.210.4230.04019.07
5.4.200.3470.03018.87
5.4.190.3870.04019.15
5.4.180.3700.03718.98
5.4.170.4130.04019.30
5.4.160.3200.03319.07
5.4.150.3170.04019.13
5.4.140.3530.04316.39
5.4.130.3700.03016.33
5.4.120.3730.03016.66
5.4.110.4030.03016.27
5.4.100.3830.03016.45
5.4.90.3300.03716.54
5.4.80.0370.04016.57
5.4.70.0130.04016.44
5.4.60.1130.03716.44
5.4.50.3830.03716.55
5.4.40.4170.03016.53
5.4.30.3700.03716.48
5.4.20.4070.02716.40
5.4.10.4230.03716.37
5.4.00.4200.03315.80
5.3.290.4030.03014.67
5.3.280.3970.03714.58
5.3.270.4000.04014.73
5.3.260.3500.04014.57
5.3.250.3800.04014.50
5.3.240.3830.03714.53
5.3.230.3470.03714.68
5.3.220.3470.03714.56
5.3.210.3230.04314.49
5.3.200.3800.04014.54
5.3.190.3570.04314.54
5.3.180.3770.03314.46
5.3.170.0070.04014.49
5.3.160.3130.03314.64
5.3.150.3630.04014.62
5.3.140.3370.03714.52
5.3.130.3830.04014.46
5.3.120.3170.04014.71
5.3.110.3830.04014.54
5.3.100.4200.03014.12
5.3.90.3900.03313.99
5.3.80.4130.03314.23
5.3.70.4170.03314.09
5.3.60.4170.03713.91
5.3.50.3800.04014.02
5.3.40.3570.03313.95
5.3.30.4030.03014.13
5.3.20.3230.04013.69
5.3.10.3970.02313.66
5.3.00.3470.03713.53
5.2.170.3100.03311.10
5.2.160.3670.02011.20
5.2.150.2600.03011.06
5.2.140.3230.02311.30
5.2.130.2870.02311.03
5.2.120.2800.03311.03
5.2.110.3200.03011.02
5.2.100.2900.03011.34
5.2.90.2700.02011.32
5.2.80.2730.03011.18
5.2.70.2730.02311.00
5.2.60.2800.02711.16
5.2.50.3130.03311.10
5.2.40.2470.03011.00
5.2.30.2670.03311.13
5.2.20.2700.03310.91
5.2.10.2630.02710.82
5.2.00.2470.03010.82
5.1.60.2130.02010.00
5.1.50.2700.0239.92
5.1.40.2770.03010.13
5.1.30.2400.02710.25
5.1.20.2330.02310.51
5.1.10.2630.03010.21
5.1.00.2230.02710.22
5.0.50.1070.0238.55
5.0.40.1070.0208.32
5.0.30.1270.0308.27
5.0.20.0670.0208.12
5.0.10.1070.0238.14
5.0.00.1070.0308.21
4.4.90.1070.0135.92
4.4.80.1400.0205.92
4.4.70.1630.0175.92
4.4.60.1500.0175.92
4.4.50.1570.0175.92
4.4.40.1130.0275.92
4.4.30.1330.0075.92
4.4.20.1370.0175.92
4.4.10.1230.0175.92
4.4.00.1430.0205.92
4.3.110.1300.0105.92
4.3.100.1070.0175.92
4.3.90.1100.0175.92
4.3.80.0630.0235.92
4.3.70.1270.0175.92
4.3.60.1170.0175.92
4.3.50.1130.0175.92
4.3.40.1100.0235.92
4.3.30.0570.0135.92
4.3.20.0800.0235.92
4.3.10.0600.0135.92
4.3.00.0500.0175.92

preferences:
137.71 ms | 1394 KiB | 7 Q