3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['a']; foreach($a as $key => $value) { echo $value; $a[] = 'meow'; }

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.0080.00816.37
8.3.50.0050.01622.11
8.3.40.0030.01418.85
8.3.30.0130.00019.04
8.3.20.0040.00420.29
8.3.10.0040.00421.85
8.3.00.0000.00919.38
8.2.180.0190.00616.50
8.2.170.0060.01522.96
8.2.160.0070.00722.13
8.2.150.0060.00324.18
8.2.140.0060.00324.66
8.2.130.0000.00726.16
8.2.120.0000.01019.77
8.2.110.0100.00021.02
8.2.100.0110.00017.75
8.2.90.0090.00019.20
8.2.80.0060.00317.97
8.2.70.0110.00017.63
8.2.60.0040.00418.16
8.2.50.0060.00318.07
8.2.40.0040.00420.07
8.2.30.0090.00018.18
8.2.20.0040.00417.67
8.2.10.0040.00418.00
8.2.00.0000.00717.75
8.1.280.0070.01125.92
8.1.270.0060.00318.96
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0030.00623.95
8.1.230.0060.00619.10
8.1.220.0030.00617.75
8.1.210.0070.00018.77
8.1.200.0100.00017.35
8.1.190.0080.00017.22
8.1.180.0030.00618.10
8.1.170.0080.00020.39
8.1.160.0040.00422.02
8.1.150.0000.00818.80
8.1.140.0030.00717.44
8.1.130.0030.00317.79
8.1.120.0030.00317.38
8.1.110.0000.00717.50
8.1.100.0040.00417.41
8.1.90.0040.00417.47
8.1.80.0080.00017.44
8.1.70.0030.00317.50
8.1.60.0030.00517.62
8.1.50.0040.00417.39
8.1.40.0040.00417.50
8.1.30.0000.00917.70
8.1.20.0000.00717.64
8.1.10.0070.00017.40
8.1.00.0040.00417.38
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0030.00318.45
8.0.270.0030.00317.13
8.0.260.0060.00017.27
8.0.250.0060.00016.86
8.0.240.0040.00416.89
8.0.230.0030.00516.98
8.0.220.0000.00816.94
8.0.210.0000.00716.80
8.0.200.0030.00316.92
8.0.190.0030.00316.98
8.0.180.0070.00016.95
8.0.170.0060.00316.81
8.0.160.0000.00716.89
8.0.150.0000.00716.90
8.0.140.0080.00016.91
8.0.130.0050.00013.30
8.0.120.0000.00816.91
8.0.110.0050.00316.87
8.0.100.0080.00016.79
8.0.90.0040.00416.88
8.0.80.0120.00916.85
8.0.70.0040.00416.83
8.0.60.0000.00716.77
8.0.50.0000.00816.88
8.0.30.0100.01216.88
8.0.20.0090.01217.40
8.0.10.0030.00317.04
8.0.00.0070.01216.82
7.4.330.0030.00315.03
7.4.320.0000.00616.48
7.4.300.0030.00316.65
7.4.290.0000.00716.48
7.4.280.0000.00816.57
7.4.270.0000.00716.47
7.4.260.0080.00016.50
7.4.250.0000.00816.47
7.4.240.0030.00516.48
7.4.230.0070.00016.42
7.4.220.0090.00916.57
7.4.210.0080.00716.60
7.4.200.0070.00016.64
7.4.160.0140.01016.61
7.4.150.0060.01417.40
7.4.140.0090.00917.86
7.4.130.0080.00916.53
7.4.120.0080.00816.53
7.4.110.0070.01016.52
7.4.100.0180.00616.48
7.4.90.0030.01316.43
7.4.80.0060.01616.59
7.4.70.0090.01216.54
7.4.60.0130.00316.45
7.4.50.0000.00816.63
7.4.40.0030.01316.37
7.4.30.0120.00616.62
7.4.00.0080.00914.85
7.3.330.0060.00013.07
7.3.320.0090.00413.14
7.3.310.0000.00616.12
7.3.300.0030.00316.16
7.3.290.0000.00716.22
7.3.280.0080.01116.28
7.3.270.0130.00717.40
7.3.260.0140.00316.29
7.3.250.0100.00716.44
7.3.240.0060.01016.52
7.3.230.0090.01216.69
7.3.210.0080.00816.50
7.3.200.0040.01519.39
7.3.190.0090.00916.50
7.3.180.0130.00316.16
7.3.170.0130.00716.39
7.3.160.0130.00616.48
7.3.120.0090.00614.59
7.3.110.0100.01014.80
7.3.100.0040.01114.80
7.3.90.0140.00415.05
7.3.80.0090.00314.76
7.3.70.0120.00314.75
7.3.60.0120.00014.78
7.3.50.0070.00714.63
7.3.40.0030.01014.59
7.3.30.0120.00314.84
7.3.20.0030.01016.58
7.3.10.0040.00416.44
7.3.00.0060.00616.82
7.2.330.0090.00916.28
7.2.320.0090.00916.38
7.2.310.0030.01316.57
7.2.300.0160.00616.63
7.2.290.0040.01316.63
7.2.250.0100.00714.88
7.2.240.0070.01514.95
7.2.230.0070.00714.75
7.2.220.0070.00714.85
7.2.210.0080.00814.71
7.2.200.0000.01414.81
7.2.190.0100.00715.06
7.2.180.0040.01214.64
7.2.170.0080.00314.83
7.2.00.0070.01419.44
7.1.330.0100.00315.89
7.1.320.0060.01016.01
7.1.310.0110.00315.89
7.1.300.0110.00315.86
7.1.290.0040.00815.52
7.1.280.0060.00915.77
7.1.270.0070.00715.74
7.1.260.0070.00715.75
7.1.100.0280.00318.09
7.1.70.0030.00317.31
7.1.60.0100.01019.50
7.1.50.0100.01316.79
7.1.00.0030.07722.50
7.0.200.0200.00314.88
7.0.140.0030.06322.11
7.0.60.0030.04020.02
7.0.50.0100.03317.88
7.0.40.0030.04720.04
7.0.30.0300.07720.17
7.0.20.0230.08720.21
7.0.10.0300.07720.09
7.0.00.0030.08320.03
5.6.280.0030.09020.89
5.6.210.0100.08020.52
5.6.200.0070.04318.15
5.6.190.0070.07720.41
5.6.180.0270.07320.54
5.6.170.0430.04720.70
5.6.160.0130.08320.47
5.6.150.0100.03318.18
5.6.140.0070.07718.16
5.6.130.0030.08318.18
5.6.120.0070.04020.97
5.6.110.0170.07721.13
5.6.100.0070.07320.95
5.6.90.0070.06021.01
5.6.80.0030.08320.38
5.6.70.0370.06320.49
5.5.350.0100.08720.52
5.5.340.0100.07717.92
5.5.330.0100.03720.23
5.5.320.0170.08020.43
5.5.310.0200.06020.17
5.5.300.0030.08717.92
5.5.290.0130.03318.02
5.5.280.0030.08720.86
5.5.270.0430.02320.95
5.5.260.0000.08020.86
5.5.250.0100.08020.58
5.5.240.0070.03720.16
5.4.450.0570.05719.13
5.4.440.0030.06319.62
5.4.430.0900.08319.18
5.4.420.1200.06018.98
5.4.410.0700.05318.88
5.4.400.0370.05318.55
5.4.390.0270.06018.81
5.4.380.0400.05318.53
5.4.370.0270.07018.77
5.4.360.0370.05018.46
5.4.350.0600.05718.55
5.4.340.0370.05718.65
5.4.320.0370.04718.56
5.4.310.0400.04718.46
5.4.300.0330.06318.68
5.4.290.0300.05318.50
5.4.280.0400.05318.54
5.4.270.0400.04718.73
5.4.260.0470.05318.58
5.4.250.0430.07018.71
5.4.240.0300.06018.75
5.4.230.0300.05318.48
5.4.220.0330.08018.71
5.4.210.0330.05318.67
5.4.200.0370.06016.40
5.4.190.0300.05018.48
5.4.180.0670.04318.61
5.4.170.0430.06718.59
5.4.160.0370.07018.70
5.4.150.0330.05018.67
5.4.140.0230.05716.08
5.4.130.0330.04716.25
5.4.120.0270.05716.27
5.4.110.0330.04316.20
5.4.100.0330.05316.30
5.4.90.0430.06016.26
5.4.80.0430.04316.20
5.4.70.0300.05016.27
5.4.60.0400.04316.27
5.4.50.0400.05316.13
5.4.40.0370.05316.03
5.4.30.0370.04016.12
5.4.20.0370.05016.12
5.4.10.0430.04016.09
5.4.00.0500.05015.76
5.3.290.0300.05014.77
5.3.280.0230.06014.51
5.3.270.0270.05714.55
5.3.260.0330.05014.52
5.3.250.0270.05314.56
5.3.240.0530.05714.70
5.3.230.0230.06314.59
5.3.220.0330.05314.47
5.3.210.0270.05714.50
5.3.200.0330.05014.56
5.3.190.0400.05014.54
5.3.180.0370.05014.55
5.3.170.0230.06014.59
5.3.160.0230.06014.50
5.3.150.0300.06714.48
5.3.140.0400.04314.59
5.3.130.0370.05014.44
5.3.120.0270.06014.54
5.3.110.0370.05014.62
5.3.100.0370.04714.02
5.3.90.0230.05713.93
5.3.80.0300.05314.13
5.3.70.0330.05714.05
5.3.60.0400.04313.88
5.3.50.0330.04714.04
5.3.40.0270.05313.93
5.3.30.0300.04713.89
5.3.20.0230.05713.78
5.3.10.0300.04713.64
5.3.00.0300.06013.55
5.2.170.0300.05011.11
5.2.160.0300.04011.18
5.2.150.0270.04011.14
5.2.140.0300.07011.18
5.2.130.0470.04011.23
5.2.120.0270.04711.03
5.2.110.0270.05011.03
5.2.100.0300.04311.11
5.2.90.0370.03311.11
5.2.80.0370.05311.01
5.2.70.0270.04711.14
5.2.60.0300.04311.02
5.2.50.0200.04711.06
5.2.40.0230.04010.99
5.2.30.0400.05010.90
5.2.20.0170.06311.11
5.2.10.0230.04010.86
5.2.00.0200.05010.87
5.1.60.0230.03710.09
5.1.50.0270.04310.11
5.1.40.0400.0339.99
5.1.30.0200.04310.45
5.1.20.0300.04010.40
5.1.10.0330.03310.20
5.1.00.0270.04310.08
5.0.50.0200.0378.67
5.0.40.0170.0308.52
5.0.30.0100.0508.21
5.0.20.0170.0278.23
5.0.10.0200.0278.36
5.0.00.0130.0578.19
4.4.90.0130.0275.91
4.4.80.0170.0235.86
4.4.70.0130.0205.89
4.4.60.0230.0135.86
4.4.50.0170.0175.95
4.4.40.0130.0335.91
4.4.30.0130.0205.84
4.4.20.0100.0235.91
4.4.10.0130.0235.96
4.4.00.0130.0335.96
4.3.110.0070.0375.82
4.3.100.0170.0205.78
4.3.90.0200.0175.77
4.3.80.0130.0335.79
4.3.70.0130.0175.82
4.3.60.0130.0205.80
4.3.50.0030.0275.80
4.3.40.0130.0335.84
4.3.30.0070.0234.68
4.3.20.0200.0174.55
4.3.10.0070.0274.51
4.3.00.0130.0207.59

preferences:
45.15 ms | 401 KiB | 5 Q