3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create an array with 0 value $array = array(0); // Iterate over the array, var_dump each value // At the same time, set the next value to "lolcats" foreach ($array as $key => &$val) { var_dump($val); $array[++$key] = "lolcats"; } // Finally var_dump the $array var_dump($array);

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.0260.00016.36
8.3.50.0250.01417.84
8.3.40.0270.01718.91
8.3.30.0310.01219.09
8.3.20.0190.00320.54
8.3.10.0160.00423.70
8.3.00.0120.00419.97
8.2.180.0340.01016.75
8.2.170.0290.01522.96
8.2.160.0380.00620.65
8.2.150.0140.00024.18
8.2.140.0170.00324.66
8.2.130.0190.00426.16
8.2.120.0150.00421.18
8.2.110.0220.00321.11
8.2.100.0220.00617.98
8.2.90.0090.00919.46
8.2.80.0030.01017.97
8.2.70.0130.00317.88
8.2.60.0140.00018.18
8.2.50.0100.00618.07
8.2.40.0100.00622.32
8.2.30.0030.01020.84
8.2.20.0030.01018.09
8.2.10.0070.01018.51
8.2.00.0110.00318.45
8.1.280.0250.01425.92
8.1.270.0150.00720.63
8.1.260.0210.00026.35
8.1.250.0150.00628.09
8.1.240.0140.00919.46
8.1.230.0260.00017.89
8.1.220.0130.00017.93
8.1.210.0070.00718.77
8.1.200.0120.00417.60
8.1.190.0090.00917.60
8.1.180.0000.01618.10
8.1.170.0100.00318.79
8.1.160.0130.00021.18
8.1.150.0150.00019.22
8.1.140.0070.00719.99
8.1.130.0040.00917.79
8.1.120.0090.00517.82
8.1.110.0030.01017.86
8.1.100.0060.00617.61
8.1.90.0120.00317.78
8.1.80.0040.00717.73
8.1.70.0080.00417.77
8.1.60.0110.00417.95
8.1.50.0110.00417.89
8.1.40.0070.00717.86
8.1.30.0110.00317.92
8.1.20.0100.00318.00
8.1.10.0100.00317.93
8.1.00.0100.00717.71
8.0.300.0090.00618.77
8.0.290.0080.00616.75
8.0.280.0070.01018.64
8.0.270.0070.00617.44
8.0.260.0040.00716.93
8.0.250.0060.00917.20
8.0.240.0110.00517.11
8.0.230.0100.00017.00
8.0.220.0090.00616.93
8.0.210.0070.00717.02
8.0.200.0000.01117.14
8.0.190.0130.00417.11
8.0.180.0060.00917.13
8.0.170.0110.00417.11
8.0.160.0130.00317.16
8.0.150.0030.00616.90
8.0.140.0090.00416.98
8.0.130.0080.00413.54
8.0.120.0090.00617.12
8.0.110.0100.00717.12
8.0.100.0100.00316.93
8.0.90.0070.00717.05
8.0.80.0260.01816.99
8.0.70.0100.00316.90
8.0.60.0130.00017.13
8.0.50.0120.00416.91
8.0.30.0370.03717.14
8.0.20.0520.02317.43
8.0.10.0080.00417.21
8.0.00.0340.02516.98
7.4.330.0040.00416.79
7.4.320.0000.01216.73
7.4.300.0090.00616.73
7.4.290.0050.00516.69
7.4.280.0100.00716.68
7.4.270.0080.00416.76
7.4.260.0080.00313.62
7.4.250.0070.00316.57
7.4.240.0080.00316.71
7.4.230.0040.00816.88
7.4.220.0270.03316.71
7.4.210.0350.01016.80
7.4.200.0030.00716.72
7.4.160.0520.02316.76
7.4.150.0460.04617.40
7.4.140.0600.04417.86
7.4.130.0460.02616.67
7.4.120.0550.01916.71
7.4.110.0580.02816.68
7.4.100.0490.04016.69
7.4.90.0810.02716.57
7.4.80.0960.05519.39
7.4.70.0510.05616.80
7.4.60.0280.02816.63
7.4.50.0280.01816.57
7.4.40.0400.02316.82
7.4.30.0420.03416.52
7.4.00.0130.01015.21
7.3.330.0110.00013.42
7.3.320.0060.00613.41
7.3.310.0070.00716.42
7.3.300.0120.00016.36
7.3.290.0200.01916.38
7.3.280.0170.02216.36
7.3.270.0620.02417.40
7.3.260.0360.02516.64
7.3.250.0640.02016.62
7.3.240.0470.03316.66
7.3.230.0560.02916.70
7.3.210.0360.02716.33
7.3.200.0340.01616.55
7.3.190.0680.04616.53
7.3.180.0210.02116.26
7.3.170.0540.02916.35
7.3.160.0250.00916.78
7.2.330.0900.01916.71
7.2.320.0460.03916.86
7.2.310.0350.02816.92
7.2.300.0430.03816.58
7.2.290.0900.03316.84
7.2.60.0120.01516.82
7.2.00.0060.01819.33
7.1.200.0110.00715.82
7.1.70.0030.00617.23
7.1.60.0130.01017.20
7.1.50.0050.01116.95
7.1.00.0170.08322.23
7.0.200.0180.00416.64
7.0.100.0130.07320.16
7.0.90.0070.04720.18
7.0.80.0200.03020.15
7.0.70.0170.03320.18
7.0.60.0270.05720.00
7.0.50.0170.05320.44
7.0.40.0230.08320.08
7.0.30.0200.07720.11
7.0.20.0200.08020.04
7.0.10.0070.05720.12
7.0.00.0070.07020.07
5.6.280.0070.02720.86
5.6.250.0070.07720.59
5.6.240.0130.07320.68
5.6.230.0030.07320.63
5.6.220.0000.05320.62
5.6.210.0070.08020.45
5.6.200.0130.05720.96
5.6.190.0070.05021.08
5.6.180.0200.04321.06
5.6.170.0070.04320.95
5.6.160.0070.04021.07
5.6.150.0130.04320.94
5.6.140.0070.08721.04
5.6.130.0170.04021.16
5.6.120.0070.08321.04
5.6.110.0070.05321.06
5.6.100.0130.07721.02
5.6.90.0070.06020.93
5.6.80.0070.05020.42
5.6.70.0000.08720.42
5.6.60.0130.06320.44
5.6.50.0100.06320.32
5.6.40.0170.06720.31
5.6.30.0030.07320.40
5.6.20.0070.04720.39
5.6.10.0170.04720.43
5.6.00.0100.08020.27
5.5.380.0070.07720.42
5.5.370.0170.07720.45
5.5.360.0030.09020.40
5.5.350.0000.04720.41
5.5.340.0030.05020.75
5.5.330.0070.07720.83
5.5.320.0100.09320.93
5.5.310.0070.08020.89
5.5.300.0070.04720.88
5.5.290.0100.07720.89
5.5.280.0130.06020.87
5.5.270.0100.07020.88
5.5.260.0000.05720.72
5.5.250.0070.05720.54
5.5.240.0070.05020.18
5.5.230.0070.05020.15
5.5.220.0100.03720.25
5.5.210.0170.07020.18
5.5.200.0130.07320.21
5.5.190.0100.08020.27
5.5.180.0100.08020.21
5.5.160.0100.07320.11
5.5.150.0070.07720.14
5.5.140.0100.08020.16
5.5.130.0030.07020.26
5.5.120.0130.05720.24
5.5.110.0070.07320.23
5.5.100.0070.09020.16
5.5.90.0070.07720.12
5.5.80.0100.07320.15
5.5.70.0200.06720.11
5.5.60.0200.06719.93
5.5.50.0200.06720.13
5.5.40.0030.04320.05
5.5.30.0070.04320.08
5.5.20.0000.04720.13
5.5.10.0100.06720.12
5.5.00.0030.08320.00

preferences:
60.28 ms | 400 KiB | 5 Q