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[] = "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.0250.00316.63
8.3.50.0280.00918.10
8.3.40.0260.00618.52
8.3.30.0380.00318.84
8.3.20.0160.00420.46
8.3.10.0170.00323.65
8.3.00.0150.00819.68
8.2.180.0180.01516.63
8.2.170.0430.00722.96
8.2.160.0330.01120.59
8.2.150.0210.00024.18
8.2.140.0190.00424.66
8.2.130.0120.00319.38
8.2.120.0170.00326.35
8.2.110.0230.00320.61
8.2.100.0130.00617.57
8.2.90.0070.00718.47
8.2.80.0090.00619.41
8.2.70.0060.00918.00
8.2.60.0030.01218.41
8.2.50.0090.00518.07
8.2.40.0000.01322.03
8.2.30.0130.00320.89
8.2.20.0060.00317.88
8.2.10.0140.00018.47
8.2.00.0070.00718.29
8.1.280.0290.01025.92
8.1.270.0090.01320.45
8.1.260.0160.00428.09
8.1.250.0120.00928.09
8.1.240.0220.00422.45
8.1.230.0250.00421.28
8.1.220.0140.00018.04
8.1.210.0150.00818.97
8.1.200.0080.00817.60
8.1.190.0110.00317.48
8.1.180.0070.00718.10
8.1.170.0030.01018.66
8.1.160.0050.00820.98
8.1.150.0070.00719.23
8.1.140.0040.01219.90
8.1.130.0070.00717.70
8.1.120.0130.00017.80
8.1.110.0040.00717.78
8.1.100.0120.00317.79
8.1.90.0110.00717.76
8.1.80.0070.00717.73
8.1.70.0040.01117.70
8.1.60.0040.01217.89
8.1.50.0100.00317.87
8.1.40.0110.00417.83
8.1.30.0070.01017.95
8.1.20.0080.00817.83
8.1.10.0140.00017.70
8.1.00.0120.00417.77
8.0.300.0100.00320.21
8.0.290.0080.00316.75
8.0.280.0130.00018.55
8.0.270.0040.00917.47
8.0.260.0080.00016.89
8.0.250.0130.00017.06
8.0.240.0070.00717.21
8.0.230.0030.01017.17
8.0.220.0110.00417.05
8.0.210.0080.00816.94
8.0.200.0120.00317.05
8.0.190.0120.00317.13
8.0.180.0060.00617.04
8.0.170.0100.00317.09
8.0.160.0110.00017.00
8.0.150.0100.00317.01
8.0.140.0040.00916.96
8.0.130.0040.00813.55
8.0.120.0040.01116.96
8.0.110.0090.00417.02
8.0.100.0030.00717.04
8.0.90.0080.00816.95
8.0.80.0100.03517.01
8.0.70.0060.00316.95
8.0.60.0030.00616.88
8.0.50.0080.00817.07
8.0.30.0500.02617.09
8.0.20.0620.02917.44
8.0.10.0050.00917.05
8.0.00.0430.03116.82
7.4.330.0080.00416.89
7.4.320.0080.00416.71
7.4.300.0040.00416.68
7.4.290.0130.00316.76
7.4.280.0160.00016.74
7.4.270.0140.00016.76
7.4.260.0100.00616.54
7.4.250.0130.00016.70
7.4.240.0060.00616.62
7.4.230.0150.00016.55
7.4.220.0240.03816.75
7.4.210.0100.03516.70
7.4.200.0130.00016.72
7.4.160.0860.02116.94
7.4.150.0580.01417.40
7.4.140.0580.02317.86
7.4.130.0680.02016.70
7.4.120.0550.02016.68
7.4.110.0430.02216.55
7.4.100.0580.03516.56
7.4.90.0690.03016.70
7.4.80.0530.01419.39
7.4.70.0550.03616.55
7.4.60.0580.03216.66
7.4.50.0070.01716.75
7.4.40.0400.01516.62
7.4.30.0320.01916.80
7.4.00.0150.00614.85
7.3.330.0070.00713.37
7.3.320.0000.00813.27
7.3.310.0080.00516.40
7.3.300.0120.00016.34
7.3.290.0260.02116.37
7.3.280.0320.02116.43
7.3.270.0540.02717.40
7.3.260.0450.03516.53
7.3.250.0500.03116.59
7.3.240.0370.03616.64
7.3.230.0820.03416.42
7.3.210.0630.03516.54
7.3.200.0220.02816.56
7.3.190.0250.03416.30
7.3.180.0320.02216.52
7.3.170.0380.03116.70
7.3.160.0310.02116.71
7.2.330.0760.03616.84
7.2.320.0500.02216.82
7.2.310.0270.04016.88
7.2.300.0220.03416.70
7.2.290.0210.01716.63
7.2.110.0270.00016.32
7.2.60.0130.00916.65
7.2.00.0070.00719.23
7.1.200.0110.01515.89
7.1.100.0250.00312.01
7.1.70.0040.01117.10
7.1.60.0320.01119.52
7.1.50.0100.02316.79
7.1.00.0230.07722.45
7.0.200.0170.01716.47
7.0.100.0170.07720.20
7.0.90.0200.06720.15
7.0.80.0230.06320.05
7.0.70.0130.04019.98
7.0.60.0200.08320.09
7.0.50.0100.04320.49
7.0.40.0130.03720.15
7.0.30.0100.04020.13
7.0.20.0070.03719.94
7.0.10.0130.03720.13
7.0.00.0030.05720.18
5.6.280.0000.03721.15
5.6.250.0070.03020.68
5.6.240.0070.08020.57
5.6.230.0130.04320.67
5.6.220.0030.07020.70
5.6.210.0070.04020.64
5.6.200.0000.04720.95
5.6.190.0000.04720.95
5.6.180.0030.04320.90
5.6.170.0030.04321.04
5.6.160.0070.06021.13
5.6.150.0030.04720.97
5.6.140.0030.04021.01
5.6.130.0100.04021.04
5.6.120.0070.03321.03
5.6.110.0030.04320.95
5.6.100.0070.04021.05
5.6.90.0030.04321.14
5.6.80.0030.03320.40
5.6.70.0100.03020.42
5.6.60.0100.02720.53
5.6.50.0000.03720.44
5.6.40.0030.03720.49
5.6.30.0030.04020.49
5.6.20.0100.02720.26
5.6.10.0070.03020.47
5.6.00.0070.04020.36
5.5.380.0030.07020.36
5.5.370.0130.03320.50
5.5.360.0070.03720.36
5.5.350.0070.04720.41
5.5.340.0070.04020.64
5.5.330.0000.04720.80
5.5.320.0070.03020.64
5.5.310.0070.04020.88
5.5.300.0000.03720.85
5.5.290.0030.05320.83
5.5.280.0100.03020.89
5.5.270.0030.04320.85
5.5.260.0000.04020.84
5.5.250.0130.04020.54
5.5.240.0070.03720.18
5.5.230.0030.03320.20
5.5.220.0070.03720.18
5.5.210.0030.04020.16
5.5.200.0030.03320.15
5.5.190.0070.04020.23
5.5.180.0070.04020.27
5.5.160.0070.03720.12
5.5.150.0100.02720.10
5.5.140.0030.03320.13
5.5.130.0030.04020.17
5.5.120.0030.04020.27
5.5.110.0000.03720.09
5.5.100.0030.03719.98
5.5.90.0000.03720.15
5.5.80.0030.03319.94
5.5.70.0030.04020.08
5.5.60.0100.03319.95
5.5.50.0000.03720.03
5.5.40.0070.03019.93
5.5.30.0030.04320.10
5.5.20.0130.06720.02
5.5.10.0170.07019.97
5.5.00.0030.07720.12

preferences:
54.13 ms | 400 KiB | 5 Q