3v4l.org

run code in 300+ PHP versions simultaneously
<?php function formatBytes($bytes, $precision = 2) { $units = array('B', 'KB', 'MB', 'GB', 'TB'); $bytes = max($bytes, 0); $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); $pow = min($pow, count($units) - 1); // Uncomment one of the following alternatives // $bytes /= pow(1024, $pow); // $bytes /= (1 << (10 * $pow)); return round($bytes, $precision) . ' ' . $units[$pow]; } echo formatBytes(24962496);

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.3.60.0070.01016.75
8.3.50.0090.01022.11
8.3.40.0170.00319.04
8.3.30.0030.01319.29
8.3.20.0040.00420.54
8.3.10.0000.00823.86
8.3.00.0040.00419.38
8.2.180.0130.00316.88
8.2.170.0110.00422.96
8.2.160.0070.01120.55
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0000.00922.33
8.2.110.0050.00522.50
8.2.100.0060.00618.00
8.2.90.0050.00319.43
8.2.80.0040.00417.97
8.2.70.0090.00317.75
8.2.60.0040.00418.17
8.2.50.0000.00818.07
8.2.40.0030.00519.81
8.2.30.0000.00718.19
8.2.20.0000.00717.81
8.2.10.0080.00018.34
8.2.00.0040.00417.93
8.1.280.0150.00625.92
8.1.270.0050.00324.09
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00023.93
8.1.230.0060.00619.38
8.1.220.0040.00417.91
8.1.210.0050.00318.77
8.1.200.0090.00017.47
8.1.190.0000.00817.25
8.1.180.0000.00818.10
8.1.170.0060.00318.84
8.1.160.0060.00322.14
8.1.150.0000.00719.13
8.1.140.0000.00717.64
8.1.130.0070.00018.00
8.1.120.0050.00217.67
8.1.110.0000.00717.48
8.1.100.0040.00417.72
8.1.90.0040.00417.62
8.1.80.0000.00817.67
8.1.70.0070.00017.56
8.1.60.0090.00017.66
8.1.50.0090.00017.73
8.1.40.0040.00417.58
8.1.30.0060.00317.81
8.1.20.0000.00817.88
8.1.10.0040.00417.66
8.1.00.0040.00417.54
8.0.300.0080.00018.77
8.0.290.0000.00816.88
8.0.280.0030.00318.69
8.0.270.0000.00717.36
8.0.260.0000.00817.36
8.0.250.0000.00717.18
8.0.240.0000.00717.16
8.0.230.0000.00717.04
8.0.220.0040.00417.10
8.0.210.0040.00417.07
8.0.200.0070.00417.21
8.0.190.0030.00317.11
8.0.180.0050.00317.09
8.0.170.0000.00917.09
8.0.160.0070.00417.03
8.0.150.0070.00017.10
8.0.140.0000.00717.07
8.0.130.0030.00313.53
8.0.120.0040.00416.93
8.0.110.0080.00017.02
8.0.100.0080.00016.95
8.0.90.0040.00416.87
8.0.80.0080.00816.98
8.0.70.0060.00317.03
8.0.60.0000.00817.13
8.0.50.0040.00417.05
8.0.30.0070.01117.06
8.0.20.0100.01317.40
8.0.10.0000.00717.22
8.0.00.0100.00816.84
7.4.330.0050.00015.18
7.4.320.0000.00716.79
7.4.300.0030.00316.78
7.4.290.0030.00716.71
7.4.280.0050.00216.67
7.4.270.0000.00816.61
7.4.260.0030.00316.73
7.4.250.0070.00016.80
7.4.240.0050.00216.71
7.4.230.0080.00016.86
7.4.220.0130.00416.81
7.4.210.0070.00716.63
7.4.200.0000.00716.67
7.4.160.0040.01216.61
7.4.150.0110.00717.40
7.4.140.0130.00517.86
7.4.130.0130.00616.75
7.4.120.0060.01216.60
7.4.110.0090.01316.78
7.4.100.0140.00316.53
7.4.90.0070.01016.59
7.4.80.0100.01019.39
7.4.70.0090.00916.72
7.4.60.0100.01416.73
7.4.50.0000.00616.60
7.4.40.0150.00616.57
7.4.30.0090.00816.72
7.4.00.0030.01415.14
7.3.330.0060.00013.30
7.3.320.0060.00013.43
7.3.310.0040.00416.33
7.3.300.0060.00016.35
7.3.290.0060.01316.35
7.3.280.0090.00716.36
7.3.270.0150.00317.40
7.3.260.0070.01616.54
7.3.250.0100.01116.54
7.3.240.0120.01216.42
7.3.230.0070.01016.43
7.3.210.0100.00616.72
7.3.200.0120.00619.39
7.3.190.0070.01116.65
7.3.180.0120.00316.54
7.3.170.0060.01216.57
7.3.160.0030.01716.50
7.2.330.0070.01016.95
7.2.320.0030.01416.52
7.2.310.0120.00616.62
7.2.300.0100.00716.76
7.2.290.0060.01616.61
7.1.70.0030.00617.21
7.1.60.0090.01519.32
7.1.50.0110.01117.07
7.1.00.0000.08022.68
7.0.200.0040.00416.97
7.0.140.0100.06722.41
7.0.60.0130.07720.21
7.0.50.0000.09318.19
7.0.40.0100.07720.55
7.0.30.0400.07320.31
7.0.20.0300.08020.34
7.0.10.0230.08020.38
7.0.00.0030.05720.52
5.6.280.0130.06321.09
5.6.210.0170.04720.89
5.6.200.0070.05018.46
5.6.190.0100.08720.79
5.6.180.0200.04320.82
5.6.170.0230.07020.84
5.6.160.0130.08020.96
5.6.150.0070.03718.54
5.6.140.0100.03318.49
5.6.130.0070.03718.46
5.6.120.0130.06321.43
5.6.110.0330.05721.27
5.6.100.0030.08321.31
5.6.90.0070.05321.39
5.6.80.0030.04320.80
5.6.70.4100.04020.68
5.5.350.0170.08320.72
5.5.340.0000.05718.34
5.5.330.0100.06720.72
5.5.320.0570.06720.60
5.5.310.0300.06320.55
5.5.300.0070.08018.32
5.5.290.0100.08018.16
5.5.280.0130.07021.02
5.5.270.0100.07321.05
5.5.260.0200.08021.15
5.5.250.0170.06720.96
5.5.240.0170.07720.56
5.4.450.1070.06019.89
5.4.440.0600.07019.25
5.4.430.0630.07019.65
5.4.420.0700.00019.75
5.4.410.0730.00019.41
5.4.400.0600.00019.31
5.4.390.0600.00019.20
5.4.380.0630.00019.25
5.4.370.0800.00019.38
5.4.360.0630.00019.20
5.4.350.0670.00019.25
5.4.340.0070.03812.06
5.4.320.0070.03512.55
5.4.310.0070.04112.54
5.4.300.0080.03312.54
5.4.290.0080.03812.54
5.4.280.0070.03412.44
5.4.270.0080.03812.44
5.4.260.0090.04212.44
5.4.250.0070.03712.43
5.4.240.0050.03812.44
5.4.230.0060.03812.43
5.4.220.0130.02812.43
5.4.210.0060.03412.43
5.4.200.0050.03812.43
5.4.190.0080.03512.43
5.4.180.0070.03412.43
5.4.170.0080.03412.43
5.4.160.0080.03312.43
5.4.150.0050.03612.43
5.4.140.0050.04512.11
5.4.130.0060.03612.10
5.4.120.0040.04112.05
5.4.110.0060.03912.05
5.4.100.0070.03812.05
5.4.90.0080.03412.05
5.4.80.0080.03412.05
5.4.70.0120.02912.05
5.4.60.0090.03612.05
5.4.50.0070.03312.05
5.4.40.0080.03212.04
5.4.30.0040.03712.03
5.4.20.0070.03712.03
5.4.10.0120.03012.03
5.4.00.0090.03911.53
5.3.290.0070.04412.80
5.3.280.0070.03612.71
5.3.270.0070.03712.72
5.3.260.0090.03612.73
5.3.250.0100.03412.73
5.3.240.0050.03812.73
5.3.230.0060.04012.71
5.3.220.0110.04112.69
5.3.210.0070.05412.69
5.3.200.0040.04112.68
5.3.190.0040.03912.69
5.3.180.0070.03712.68
5.3.170.0060.03812.68
5.3.160.0050.03812.68
5.3.150.0100.03812.68
5.3.140.0050.03912.67
5.3.130.0060.04312.67
5.3.120.0080.04112.66
5.3.110.0090.04012.67
5.3.100.0060.03812.16
5.3.90.0050.03712.14
5.3.80.0080.03712.13
5.3.70.0060.04212.14
5.3.60.0040.04412.12
5.3.50.0070.03812.06
5.3.40.0070.03712.06
5.3.30.0040.04112.02
5.3.20.0110.03111.80
5.3.10.0040.03711.77
5.3.00.0060.03511.76
5.2.170.0070.0289.25
5.2.160.0100.0359.26
5.2.150.0060.0339.25
5.2.140.0050.0329.25
5.2.130.0060.0299.21
5.2.120.0090.0259.21
5.2.110.0020.0329.22
5.2.100.0040.0299.22
5.2.90.0040.0309.22
5.2.80.0060.0299.21
5.2.70.0060.0369.21
5.2.60.0090.0369.17
5.2.50.0030.0349.14
5.2.40.0050.0299.12
5.2.30.0050.0309.09
5.2.20.0080.0279.08
5.2.10.0040.0299.00
5.2.00.0070.0308.86
5.1.60.0030.0288.15
5.1.50.0030.0258.14
5.1.40.0010.0298.12
5.1.30.0020.0288.48
5.1.20.0010.0298.49
5.1.10.0020.0318.22
5.1.00.0030.0278.21
5.0.50.0040.0206.69
5.0.40.0010.0226.55
5.0.30.0020.0326.37
5.0.20.0020.0206.34
5.0.10.0030.0206.31
5.0.00.0070.0276.31
4.4.90.0020.0184.78
4.4.80.0040.0154.76
4.4.70.0030.0194.75
4.4.60.0040.0164.75
4.4.50.0030.0164.77
4.4.40.0050.0264.70
4.4.30.0050.0164.76
4.4.20.0060.0154.84
4.4.10.0050.0184.85
4.4.00.0050.0284.76
4.3.110.0040.0204.67
4.3.100.0020.0194.66
4.3.90.0020.0154.64
4.3.80.0030.0254.61
4.3.70.0030.0164.63
4.3.60.0030.0144.62
4.3.50.0030.0214.63
4.3.40.0030.0254.55
4.3.30.0020.0153.36
4.3.20.0050.0153.34
4.3.10.0020.0183.30
4.3.00.0130.0237.20

preferences:
42.85 ms | 401 KiB | 5 Q