3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = range(0, 1e6); echo memory_get_peak_usage()/1024 . 'kB' . PHP_EOL; foreach ($array as $i => $a) { echo $a; } echo memory_get_peak_usage()/1024 . 'kB';

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.0470.01733.33
8.3.50.0560.01231.67
8.3.40.0390.02634.10
8.3.30.0420.01634.14
8.3.20.0280.00335.52
8.3.10.0170.01038.84
8.3.00.0160.00937.86
8.2.180.0580.01331.75
8.2.170.0380.02134.04
8.2.160.0330.02235.78
8.2.150.0270.01634.52
8.2.140.0220.01338.20
8.2.130.0100.01435.80
8.2.120.0300.00332.63
8.2.110.0260.01034.68
8.2.100.0420.01433.00
8.2.90.0210.00434.61
8.2.80.0070.01732.75
8.2.70.0200.01032.63
8.2.60.0210.00033.29
8.2.50.0180.01132.71
8.2.40.0070.01336.44
8.2.30.0160.01633.33
8.2.20.0150.00733.06
8.2.10.0140.00733.39
8.2.00.0190.01133.55
8.1.280.0670.01746.63
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.17
8.1.230.0080.00417.42
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0030.00617.13
8.1.190.0040.00417.10
8.1.180.0040.00418.10
8.1.170.0040.00418.41
8.1.160.0040.00422.01
8.1.150.0040.00418.86
8.1.140.0080.00017.38
8.1.130.0070.00017.57
8.1.120.0040.00417.36
8.1.110.0040.00417.28
8.1.100.0000.00717.29
8.1.90.0000.00717.38
8.1.80.0050.00217.39
8.1.70.0000.00717.38
8.1.60.0000.00817.54
8.1.50.0040.00417.37
8.1.40.0050.00317.36
8.1.30.0090.00017.65
8.1.20.0050.00317.62
8.1.10.0140.01348.18
8.1.00.0190.01348.14
8.0.300.0240.00947.10
8.0.290.0210.01447.00
8.0.280.0120.01249.01
8.0.270.0230.01047.76
8.0.260.0140.01147.87
8.0.250.0200.01347.48
8.0.240.0130.02247.47
8.0.230.0160.01647.32
8.0.220.0220.00347.33
8.0.210.0220.00947.34
8.0.200.0270.01047.46
8.0.190.0190.00947.46
8.0.180.0230.01047.44
8.0.170.0200.01047.34
8.0.160.0250.01147.41
8.0.150.0290.00647.39
8.0.140.0220.01947.35
8.0.130.0300.00743.91
8.0.120.0210.01847.33
8.0.110.0190.00647.25
8.0.100.0170.01047.33
8.0.90.0210.01147.34
8.0.80.0440.04747.40
8.0.70.0150.00947.39
8.0.60.0160.01047.22
8.0.50.0160.00947.38
8.0.30.0750.03447.68
8.0.20.0820.05447.33
8.0.10.0190.01547.48
8.0.00.1140.05647.08
7.4.330.0360.00745.66
7.4.320.0190.01247.02
7.4.300.0100.02046.81
7.4.290.0160.01646.91
7.4.280.0200.01047.04
7.4.270.0200.00746.90
7.4.260.0140.02447.11
7.4.250.0330.00346.78
7.4.240.0170.01046.92
7.4.230.0220.01247.12
7.4.220.0580.07846.97
7.4.210.0540.06846.92
7.4.200.0130.01347.14
7.4.160.0640.07946.92
7.4.150.0910.05946.89
7.4.140.1090.07147.02
7.4.130.0740.06946.98
7.4.120.0860.04347.10
7.4.110.0750.05947.02
7.4.100.1080.06146.95
7.4.90.0900.05546.97
7.4.80.1110.05247.12
7.4.70.0770.04547.04
7.4.60.0490.03546.95
7.4.50.0230.00747.09
7.4.40.0580.07346.99
7.4.30.0800.07446.96
7.4.00.0310.02444.98
7.3.330.0150.02343.79
7.3.320.0280.00743.69
7.3.310.0270.01346.79
7.3.300.0130.01946.59
7.3.290.0790.05946.67
7.3.280.0650.04346.74
7.3.270.0930.06247.04
7.3.260.0820.08546.83
7.3.250.0830.03846.82
7.3.240.1090.06846.74
7.3.230.1180.06547.02
7.3.210.0790.02946.62
7.3.200.0680.06446.77
7.3.190.0890.06346.91
7.3.180.0640.05147.11
7.3.170.0780.04346.65
7.3.160.0540.04446.76
7.2.330.0730.02747.25
7.2.320.0610.06547.24
7.2.310.0640.06746.87
7.2.300.0990.04147.01
7.2.290.0890.05846.90
7.2.60.0730.01748.69
7.2.00.0270.01251.46
7.1.200.0490.01647.86
7.1.100.0090.02550.04
7.1.70.1000.01349.15
7.1.60.0290.03349.28
7.1.50.0270.02449.27
7.1.00.0170.09754.34
7.0.200.3410.01045.21
7.0.100.3670.08050.50
7.0.90.2670.09050.50
7.0.80.2700.08350.63
7.0.70.3730.08350.50
7.0.60.2800.08750.38
7.0.50.3670.08050.86
7.0.40.2930.08750.60
7.0.30.3430.08050.69
7.0.20.2730.08050.48
7.0.10.3570.08750.68
7.0.00.3330.08350.56
5.6.280.0230.12085.54
5.6.250.0170.09085.24
5.6.240.0300.12085.19
5.6.230.0300.11785.31
5.6.220.0370.09085.16
5.6.210.0330.07785.25
5.6.200.0500.09785.75
5.6.190.0330.13385.81
5.6.180.0330.12085.74
5.6.170.0330.11385.70
5.6.160.0370.13085.57
5.6.150.0430.13385.74
5.6.140.0300.11085.73
5.6.130.0370.11385.64
5.6.120.0430.11785.70
5.6.110.0570.10785.70
5.6.100.0370.06785.70
5.6.90.0370.11085.70
5.6.80.0370.07085.13
5.6.70.0430.10385.03
5.6.60.0400.11085.05
5.6.50.0430.09785.13
5.6.40.0570.10085.03
5.6.30.0500.11785.08
5.6.20.0400.05785.00
5.6.10.0430.09385.02
5.6.00.0270.12785.01
5.5.380.0300.05785.07
5.5.370.0330.10385.12
5.5.360.0230.14085.05
5.5.350.0330.09784.98
5.5.340.0330.13385.48
5.5.330.0270.12785.42
5.5.320.0330.11785.44
5.5.310.0370.12085.29
5.5.300.0400.12085.52
5.5.290.0430.08085.54
5.5.280.0330.08385.47
5.5.270.0430.10085.43
5.5.260.0330.12785.48
5.5.250.0470.11385.23
5.5.240.0200.09384.93
5.5.230.0370.10384.91
5.5.220.0300.12784.81
5.5.210.0500.11384.75
5.5.200.0400.12384.88
5.5.190.0400.11784.89
5.5.180.0230.11784.72
5.5.160.0300.11784.89
5.5.150.0200.12084.78
5.5.140.0500.12384.85
5.5.130.0300.12084.84
5.5.120.0500.10384.87
5.5.110.0370.12084.59
5.5.100.0230.07384.80
5.5.90.0430.12384.73
5.5.80.0330.12084.65
5.5.70.0170.07784.75
5.5.60.0330.06084.67
5.5.50.0300.11384.73
5.5.40.0300.08384.68
5.5.30.0230.09084.70
5.5.20.0370.09784.66
5.5.10.0330.07784.79
5.5.00.0400.11784.66
5.4.450.0370.13383.90
5.4.440.0430.11383.93
5.4.430.0300.12083.79
5.4.420.0230.09383.65
5.4.410.0300.11383.67
5.4.400.0370.12383.62
5.4.390.0270.12083.39
5.4.380.0330.12783.67
5.4.370.0330.07383.63
5.4.360.0200.13083.54
5.4.350.0200.10783.47
5.4.340.0270.08083.63
5.4.320.0270.11083.62
5.4.310.0470.10383.52
5.4.300.0430.12083.61
5.4.290.0400.10783.72
5.4.280.0300.11783.39
5.4.270.0270.12783.61
5.4.260.0230.10783.66
5.4.250.0400.11783.61
5.4.240.0300.07383.47
5.4.230.0200.07083.55
5.4.220.0270.07083.60
5.4.210.0300.10383.62
5.4.200.0300.11783.55
5.4.190.0400.11383.51
5.4.180.0430.11383.52
5.4.170.0270.07083.49
5.4.160.0400.10783.50
5.4.150.0370.10383.66
5.4.140.0400.06780.91
5.4.130.0370.11780.68
5.4.120.0300.11080.77
5.4.110.0300.14380.86
5.4.100.0430.09381.05
5.4.90.0200.12780.97
5.4.80.0630.09380.94
5.4.70.0270.08081.01
5.4.60.0370.10380.89
5.4.50.0330.12080.94
5.4.40.0230.13080.73
5.4.30.0530.09380.93
5.4.20.0370.10780.94
5.4.10.0470.11080.82
5.4.00.0330.08080.38

preferences:
53.79 ms | 401 KiB | 5 Q