3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = range(0, 1e7); echo memory_get_peak_usage()/1024 . 'kB'; 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.40.0090.01218.50
8.3.30.0040.01118.70
8.3.20.0080.00020.39
8.3.10.0050.00323.77
8.3.00.0040.00422.51
8.2.170.0090.00622.96
8.2.160.0070.00720.50
8.2.150.0090.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0060.00317.63
8.2.110.0030.00621.12
8.2.100.0080.00417.91
8.2.90.0080.00019.05
8.2.80.0030.00617.97
8.2.70.0030.00517.25
8.2.60.0000.00717.80
8.2.50.0060.00318.07
8.2.40.0050.00321.23
8.2.30.0050.00218.03
8.2.20.0040.00417.61
8.2.10.0040.00418.07
8.2.00.0040.00417.84
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0070.00324.00
8.1.230.0060.00617.42
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.23
8.1.190.0050.00317.21
8.1.180.0040.00418.10
8.1.170.0000.00818.46
8.1.160.0000.01022.00
8.1.150.0070.00018.82
8.1.140.0000.00817.38
8.1.130.0030.00317.62
8.1.120.0000.00717.42
8.1.110.0000.00717.27
8.1.100.0000.00717.37
8.1.90.0040.00417.39
8.1.80.0000.00717.28
8.1.70.0030.00317.29
8.1.60.0000.00817.52
8.1.50.0030.00517.47
8.1.40.0030.00517.32
8.1.30.0030.00517.47
8.1.20.0000.00717.61
8.1.10.0050.00217.42
8.1.00.0060.00317.39
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0000.00718.43
8.0.270.0000.00717.06
8.0.260.0030.00317.09
8.0.250.0000.00716.97
8.0.240.0040.00416.94
8.0.230.0080.00016.96
8.0.220.0030.00316.85
8.0.210.0000.00816.77
8.0.200.0070.00016.87
8.0.190.0040.00416.97
8.0.180.0030.00516.92
8.0.170.0080.00016.94
8.0.160.0060.00316.89
8.0.150.0000.00816.86
8.0.140.0030.00516.77
8.0.130.0050.00013.24
8.0.120.0030.00616.86
8.0.110.0050.00316.77
8.0.100.0040.00416.90
8.0.90.0040.00416.89
8.0.80.0170.00316.86
8.0.70.0080.00016.96
8.0.60.0040.00416.82
8.0.50.0070.00016.82
8.0.30.0080.01316.98
8.0.20.0120.00617.40
8.0.10.0040.00416.88
8.0.00.0100.01116.76
7.4.330.0070.00015.08
7.4.320.0040.00416.43
7.4.300.0030.00316.52
7.4.290.0040.00416.44
7.4.280.0040.00416.40
7.4.270.0070.00016.55
7.4.260.0000.00716.32
7.4.250.0060.00316.49
7.4.240.0050.00216.46
7.4.230.0030.00516.27
7.4.220.0090.00616.44
7.4.210.0100.01016.52
7.4.200.0000.00716.60
7.4.160.0030.01216.64
7.4.150.0070.01117.40
7.4.140.0070.01217.86
7.4.130.0130.00816.45
7.4.120.0120.00916.51
7.4.110.0070.01016.48
7.4.100.0130.00916.37
7.4.90.0120.00616.33
7.4.80.0030.02419.39
7.4.70.0100.00716.57
7.4.60.0070.01116.42
7.4.50.0040.00416.31
7.4.40.0110.00416.44
7.4.30.0110.00716.41
7.4.00.0070.01014.85
7.3.330.0000.00613.13
7.3.320.0060.00013.00
7.3.310.0040.00416.13
7.3.300.0030.00616.14
7.3.290.0110.00616.25
7.3.280.0070.00816.24
7.3.270.0050.01217.40
7.3.260.0090.00916.31
7.3.250.0110.00716.35
7.3.240.0170.00716.29
7.3.230.0100.01316.39
7.3.210.0150.00316.41
7.3.200.0070.01719.39
7.3.190.0090.00616.44
7.3.180.0030.01216.35
7.3.170.0100.00716.35
7.3.160.0040.01216.15
7.3.120.0130.00614.42
7.3.110.0070.01114.88
7.3.100.0120.00314.39
7.3.90.0090.00614.59
7.3.80.0030.01414.88
7.3.70.0000.01214.50
7.3.60.0040.01214.73
7.3.50.0070.00314.75
7.3.40.0080.00814.43
7.3.30.0080.00414.61
7.3.20.0000.00916.51
7.3.10.0100.00316.56
7.3.00.0090.00316.62
7.2.330.0140.00416.60
7.2.320.0090.00916.48
7.2.310.0030.01316.61
7.2.300.0060.01116.47
7.2.290.0080.00816.48
7.2.250.0030.01714.60
7.2.240.0140.00714.75
7.2.230.0060.01014.77
7.2.220.0040.01214.78
7.2.210.0100.00314.86
7.2.200.0060.00914.70
7.2.190.0040.01114.88
7.2.180.0040.00814.91
7.2.170.0070.00714.55
7.2.60.0030.01016.39
7.2.00.0030.00919.20
7.1.330.0090.00615.50
7.1.320.0090.00315.56
7.1.310.0060.00815.60
7.1.300.0110.00415.79
7.1.290.0030.00915.84
7.1.280.0030.00615.60
7.1.270.0000.01315.43
7.1.260.0090.00315.76
7.1.200.0100.00315.51
7.1.100.0030.00717.98
7.1.70.0000.00816.95
7.1.60.0090.01520.03
7.1.50.0040.00816.89
7.1.00.0070.07022.40
7.0.200.0070.00714.97
7.0.60.0070.08320.07
7.0.50.0130.07017.89
7.0.40.0030.04319.96
7.0.30.0300.07320.13
7.0.20.0170.06719.99
7.0.10.0070.08019.99
7.0.00.0000.04320.01
5.6.280.0200.11385.42
5.6.210.0230.11385.29
5.6.200.0230.13082.67
5.6.190.0330.09785.11
5.6.180.0630.08385.07
5.6.170.0470.08085.00
5.6.160.0370.10385.00
5.6.150.0200.07782.76
5.6.140.0200.09082.76
5.6.130.0270.08382.79
5.6.120.0400.07085.68
5.6.110.0170.09785.73
5.6.100.0470.10085.63
5.6.90.0200.07085.60
5.6.80.0330.08085.02
5.5.350.4100.08784.96
5.5.340.0330.11782.38
5.5.330.0330.12084.68
5.5.320.0330.10384.72
5.5.310.0370.08384.70
5.5.300.0170.07782.38
5.5.290.0130.09782.56
5.5.280.0270.11085.41
5.5.270.0430.11085.43
5.5.260.0500.10085.48
5.5.250.0430.10385.33
5.5.240.0470.12384.75
5.4.450.0400.12384.15
5.4.440.0430.10783.71
5.4.430.0330.09783.77
5.4.420.0500.10383.96
5.4.410.0370.09083.70
5.4.400.0570.10083.61
5.4.390.0270.09383.50
5.4.380.0170.10083.46
5.4.370.0330.08383.82
5.4.360.0330.12783.80
5.4.350.0430.08383.81
5.4.340.0330.06783.64
5.4.320.0270.06783.79
5.4.310.0370.06383.58
5.4.300.0230.07383.50
5.4.290.0230.07083.64
5.4.280.0470.07383.65
5.4.270.0470.04783.39
5.4.260.0270.07783.64
5.4.250.0470.10083.64
5.4.240.0330.06383.36
5.4.230.0270.07083.80
5.4.220.0400.05783.78
5.4.210.0270.06783.69
5.4.200.0330.06383.79
5.4.190.0100.09383.80
5.4.180.0300.06783.60
5.4.170.0270.08083.59
5.4.160.0270.06783.78
5.4.150.0300.06783.63
5.4.140.0270.06780.86
5.4.130.0330.07380.98
5.4.120.0200.07380.95
5.4.110.0400.10080.95
5.4.100.0430.11080.79
5.4.90.0430.11381.04
5.4.80.0270.07380.99
5.4.70.0400.07781.02

preferences:
56.68 ms | 400 KiB | 5 Q