3v4l.org

run code in 500+ PHP versions simultaneously
<?php function fm_get_filesize($size) { $size = (float) $size; $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); $power = $size > 0 ? floor(log($size, 1024)) : 0; return sprintf('%s %s', round($size / pow(1024, $power), 2), $units[$power]); } for ($i = 0; $i < 100; $i++) { echo fm_get_filesize(pow('102'.rand(4, 100), $i))."\n"; }

Abusive script

This script was stopped while abusing our resources

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)
8.5.90.0130.00718.91
8.5.80.0140.00619.00
8.5.70.0120.00918.96
8.5.60.0100.01018.79
8.5.50.0140.00618.70
8.5.40.0120.00918.70
8.5.30.0150.00618.75
8.5.20.0110.00818.73
8.5.10.0240.00717.03
8.5.00.0110.00818.72
8.4.240.0190.00921.92
8.4.230.0160.01121.66
8.4.220.0180.00921.58
8.4.210.0130.00921.69
8.4.200.0190.00821.74
8.4.190.0180.00921.86
8.4.180.0170.01021.75
8.4.170.0210.00621.52
8.4.160.0160.01121.71
8.4.150.0200.00721.94
8.4.140.0160.01019.93
8.4.130.0160.00819.89
8.4.120.0190.00519.77
8.4.110.0130.01019.95
8.4.100.0170.00920.06
8.4.90.0160.00919.95
8.4.80.0120.01419.89
8.4.70.0170.00619.95
8.4.60.0200.00918.39
8.4.50.0120.01318.35
8.4.40.0130.01218.11
8.4.30.0170.00818.15
8.4.20.0220.01017.97
8.4.10.0180.00918.21
8.3.330.0160.00718.77
8.3.320.0160.01118.80
8.3.310.0170.00818.83
8.3.300.0150.00718.91
8.3.290.0120.01318.81
8.3.280.0180.00618.91
8.3.270.0150.00817.07
8.3.260.0170.00617.13
8.3.250.0130.01017.00
8.3.240.0120.01117.01
8.3.230.0150.00917.07
8.3.220.0140.01117.03
8.3.210.0170.00716.93
8.3.200.0160.00817.00
8.3.190.0160.00917.06
8.3.180.0130.01116.99
8.3.170.0170.00716.99
8.3.160.0160.00817.06
8.3.150.0160.01016.98
8.3.140.0160.00917.04
8.3.130.0180.00616.93
8.3.120.0180.00617.09
8.3.110.0200.00517.05
8.3.100.0190.00417.04
8.3.90.0140.00816.99
8.3.80.0150.00916.99
8.3.70.0160.00917.15
8.3.60.0190.00716.80
8.3.50.0190.00517.03
8.3.40.0210.00918.23
8.3.30.0200.00718.25
8.3.20.0260.00918.22
8.3.10.0210.01018.27
8.3.00.0150.01018.29
8.2.330.0170.00818.48
8.2.320.0150.00818.43
8.2.310.0180.00718.41
8.2.300.0300.01018.48
8.2.290.0280.00716.87
8.2.280.0220.01116.90
8.2.270.0290.00916.78
8.2.260.0320.00616.65
8.2.250.0270.01017.17
8.2.240.0270.01116.72
8.2.230.0300.00816.76
8.2.220.0270.01116.78
8.2.210.0300.00816.85
8.2.200.0320.00516.82
8.2.190.0240.01416.80
8.2.180.0250.01216.75
8.2.170.0280.00918.23
8.2.160.0280.00918.17
8.2.150.0300.00818.25
8.2.140.0270.01018.20
8.2.130.0290.00918.04
8.2.120.0280.00818.26
8.2.110.0300.00618.21
8.2.100.0280.01018.17
8.2.90.0310.00718.24
8.2.80.0290.00817.95
8.2.70.0350.00418.21
8.2.60.0140.01117.95
8.2.50.0290.00818.27
8.2.40.0300.00818.22
8.2.30.0220.01118.17
8.2.20.0300.00718.08
8.2.10.0270.01118.03
8.2.00.0300.00817.89
8.1.340.0430.00517.77
8.1.330.0300.00716.57
8.1.320.0290.00616.57
8.1.310.0250.01216.46
8.1.300.0290.00916.36
8.1.290.0290.00816.42
8.1.280.0260.01216.36
8.1.270.0340.00917.77
8.1.260.0320.00417.86
8.1.250.0200.01117.93
8.1.240.0170.01017.91
8.1.230.0220.00517.92
8.1.220.0140.01017.76
8.1.210.0180.00817.85
8.1.200.0140.00717.85
8.1.190.0110.00517.72
8.1.180.0110.00617.84
8.1.170.0170.00517.93
8.1.160.0150.01117.77
8.1.150.0210.00517.91
8.1.140.0190.00917.71
8.1.130.0170.01017.91
8.1.120.0230.01217.99
8.1.110.0170.00817.95
8.1.100.0170.00717.96
8.1.90.0170.00917.93
8.1.00.0080.00317.65
8.0.130.0130.00717.10
8.0.120.0110.00717.21
8.0.110.0110.00717.00
8.0.100.0190.00017.10
8.0.90.0150.00517.11
8.0.80.0090.00917.14
8.0.70.0180.00417.18
8.0.60.0200.00016.96
8.0.50.0170.00316.86
8.0.30.0180.00416.98
8.0.20.0160.00517.21
8.0.10.0120.00817.28
8.0.00.0000.01017.23
7.4.260.0190.00316.82
7.4.250.0170.00516.73
7.4.240.0190.00316.74
7.4.230.0220.00416.57
7.4.220.0160.00316.74
7.4.210.0160.00316.73
7.4.200.0140.00616.66
7.4.190.0160.00316.76
7.4.180.0160.00316.92
7.4.160.0180.00016.84
7.4.150.0120.00716.54
7.4.140.0170.00316.65
7.4.130.0170.00216.61
7.4.120.0120.00416.59
7.4.110.0140.00316.54
7.4.100.0160.00316.79
7.4.90.0170.00316.68
7.4.80.0060.01316.77
7.4.70.0130.00816.60
7.4.60.0130.00716.76
7.4.50.0160.00516.64
7.4.40.0120.00816.63
7.4.30.0170.00316.82
7.4.20.0190.00016.55
7.4.10.0150.00416.74
7.4.00.0160.00316.57
7.3.330.0140.00416.66
7.3.320.0200.00016.55
7.3.310.0180.00016.57
7.3.300.0180.00016.67
7.3.290.0060.01216.54
7.3.280.0110.01016.57
7.3.270.0150.00816.73
7.3.260.0210.00016.70
7.3.250.0170.00316.78
7.3.240.0160.00316.48
7.3.230.0170.00416.61
7.3.220.0200.00016.41
7.3.210.0060.00416.57
7.3.200.0150.00316.57
7.3.190.0180.00016.59
7.3.180.0130.00416.53
7.3.170.0110.00816.59
7.3.160.0120.00416.56
7.3.150.0180.00016.45
7.3.140.0100.00716.34
7.3.130.0170.00316.39
5.0.00.0000.00510.41

preferences:
75.2 ms | 2776 KiB | 5 Q