3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(1); $arr = ['a', 'b']; $child = &$arr; $i = 0; foreach ($child AS $key => $fruit) { $child[$i] = $fruit; $i++; } var_dump($child);

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.0070.01418.55
8.3.50.0150.00321.17
8.3.40.0070.00718.71
8.3.30.0110.00418.92
8.3.20.0040.00420.33
8.3.10.0080.00020.40
8.3.00.0080.00019.38
8.2.180.0150.00316.63
8.2.170.0120.00922.96
8.2.160.0070.00720.43
8.2.150.0080.00024.18
8.2.140.0000.00924.66
8.2.130.0070.00026.16
8.2.120.0040.00422.26
8.2.110.0040.00420.29
8.2.100.0120.00018.19
8.2.90.0050.00319.36
8.2.80.0040.00417.97
8.2.70.0000.00817.50
8.2.60.0040.00818.04
8.2.50.0070.00418.07
8.2.40.0080.00019.94
8.2.30.0030.00718.05
8.2.20.0000.00717.70
8.2.10.0050.00318.11
8.2.00.0070.00017.66
8.1.280.0110.00425.92
8.1.270.0000.00923.91
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0030.00624.00
8.1.230.0070.00319.02
8.1.220.0050.00317.77
8.1.210.0030.00518.77
8.1.200.0000.00917.22
8.1.190.0080.00017.35
8.1.180.0000.00918.10
8.1.170.0030.00618.58
8.1.160.0040.00422.06
8.1.150.0030.00318.85
8.1.140.0040.00417.45
8.1.130.0000.00717.87
8.1.120.0070.00017.34
8.1.110.0000.00817.46
8.1.100.0040.00417.34
8.1.90.0030.00517.46
8.1.80.0070.00017.45
8.1.70.0000.00817.46
8.1.60.0040.00417.64
8.1.50.0030.00517.52
8.1.40.0050.00317.48
8.1.30.0030.00617.58
8.1.20.0000.00817.62
8.1.10.0000.00717.41
8.1.00.0000.01017.41
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0070.00018.29
8.0.270.0030.00317.25
8.0.260.0020.00517.30
8.0.250.0000.00716.88
8.0.240.0060.00016.98
8.0.230.0070.00016.97
8.0.220.0080.00016.92
8.0.210.0000.00616.87
8.0.200.0000.00716.91
8.0.190.0000.00816.93
8.0.180.0000.00816.88
8.0.170.0030.00616.82
8.0.160.0040.00416.88
8.0.150.0000.00716.89
8.0.140.0040.00416.80
8.0.130.0030.00313.36
8.0.120.0030.00616.90
8.0.110.0040.00416.89
8.0.100.0050.00316.91
8.0.90.0070.00016.92
8.0.80.0130.00316.91
8.0.70.0040.00416.84
8.0.60.0050.00216.88
8.0.50.0040.00416.72
8.0.30.0060.01317.17
8.0.20.0140.00517.40
8.0.10.0040.00416.82
8.0.00.0080.00916.88
7.4.330.0000.00515.14
7.4.320.0030.00316.58
7.4.300.0040.00416.49
7.4.290.0030.00316.59
7.4.280.0040.00416.58
7.4.270.0030.00316.41
7.4.260.0040.00416.48
7.4.250.0000.00716.38
7.4.240.0020.00516.51
7.4.230.0030.00316.61
7.4.220.0120.00616.50
7.4.210.0090.00916.60
7.4.200.0070.00016.50
7.4.160.0180.00016.57
7.4.150.0180.00017.40
7.4.140.0080.00817.86
7.4.130.0080.00916.36
7.4.120.0090.00816.50
7.4.110.0040.01216.65
7.4.100.0110.00816.53
7.4.90.0170.00416.43
7.4.80.0070.01019.39
7.4.70.0030.01316.63
7.4.60.0040.01216.49
7.4.50.0040.00016.44
7.4.40.0100.00616.45
7.4.30.0060.01016.27
7.4.00.0090.00614.86
7.3.330.0030.00313.20
7.3.320.0000.00613.25
7.3.310.0080.00016.42
7.3.300.0030.00316.33
7.3.290.0080.00616.32
7.3.280.0070.01116.34
7.3.270.0130.00517.40
7.3.260.0070.01016.53
7.3.250.0110.01116.37
7.3.240.0100.00716.73
7.3.230.0060.01016.39
7.3.210.0100.00616.22
7.3.200.0120.00919.39
7.3.190.0110.00616.59
7.3.180.0150.00016.29
7.3.170.0030.01316.44
7.3.160.0100.00716.48
7.2.330.0100.00716.55
7.2.320.0030.01416.62
7.2.310.0060.01216.66
7.2.300.0030.01416.45
7.2.290.0040.01416.53
7.2.00.0080.01219.14
7.1.100.0060.00918.23
7.1.70.0000.00717.01
7.1.60.0140.01019.32
7.1.50.0060.01616.92
7.1.00.0030.07722.30
7.0.200.0030.00716.79
7.0.140.0000.08022.04
7.0.60.0170.05720.07
7.0.50.0030.06717.89
7.0.40.0070.08320.03
7.0.30.0230.07320.18
7.0.20.0300.06720.31
7.0.10.0030.04320.00
7.0.00.0070.08320.01
5.6.280.0030.07321.07
5.6.210.0130.07320.76
5.6.200.0130.04318.17
5.6.190.0030.08320.43
5.6.180.0630.05020.64
5.6.170.0400.07020.50
5.6.160.0100.08320.33
5.6.150.0070.08318.21
5.6.140.0200.03718.21
5.6.130.0070.07318.11
5.6.120.0070.08720.73
5.6.110.0130.07721.13
5.6.100.0100.07721.00
5.6.90.0030.06021.13
5.6.80.0070.05720.40
5.5.350.0170.04020.52
5.5.340.0170.06717.92
5.5.330.0070.07720.36
5.5.320.0500.05320.13
5.5.310.0300.07320.20
5.5.300.0030.08017.93
5.5.290.0070.08017.93
5.5.280.0100.07720.96
5.5.270.0100.09720.86
5.5.260.0130.07320.96
5.5.250.0100.06320.61
5.5.240.0330.06320.07
5.4.450.0170.03319.39
5.4.440.0200.02319.46
5.4.430.0200.03319.54
5.4.420.0670.00019.48
5.4.410.0600.00019.37
5.4.400.0600.00018.86
5.4.390.0630.00019.07
5.4.380.0630.00019.08
5.4.370.0630.00019.13
5.4.360.0770.00018.95
5.4.350.0630.00019.15
5.4.340.0600.00019.00
5.4.320.0070.03512.45
5.4.310.0070.03912.45
5.4.300.0070.04212.46
5.4.290.0010.04512.45
5.4.280.0050.03612.35
5.4.270.0040.04112.35
5.4.260.0060.03912.35
5.4.250.0050.04312.35
5.4.240.0040.03912.35
5.4.230.0050.04012.34
5.4.220.0050.03812.34
5.4.210.0100.03712.34
5.4.200.0090.03912.34
5.4.190.0030.04012.34
5.4.180.0060.03712.34
5.4.170.0060.03812.35
5.4.160.0090.03712.34
5.4.150.0060.03612.34
5.4.140.0070.03912.03
5.4.130.0080.04312.01
5.4.120.0080.03811.97
5.4.110.0050.03811.96
5.4.100.0060.03511.97
5.4.90.0070.04011.96
5.4.80.0060.03811.97
5.4.70.0080.03311.96
5.4.60.0080.04111.96
5.4.50.0080.03411.96
5.4.40.0060.03511.95
5.4.30.0050.04111.95
5.4.20.0050.03611.95
5.4.10.0070.04111.95
5.4.00.0070.03911.44
5.3.290.0100.03912.80
5.3.280.0100.03712.70
5.3.270.0110.04912.72
5.3.260.0240.10712.72
5.3.250.0180.10012.72
5.3.240.0110.04912.72
5.3.230.0130.05812.70
5.3.220.0260.10112.68
5.3.210.0220.10012.68
5.3.200.0240.10412.68
5.3.190.0300.15012.68
5.3.180.0380.13512.67
5.3.170.0220.08312.67
5.3.160.0050.05612.67
5.3.150.0190.08512.68
5.3.140.0160.07112.66
5.3.130.0120.06912.66
5.3.120.0160.07512.66
5.3.110.0150.05812.66
5.3.100.0120.05412.12
5.3.90.0050.04512.08
5.3.80.0120.06012.07
5.3.70.0120.05812.07
5.3.60.0080.05912.07
5.3.50.0090.05112.00
5.3.40.0100.05212.00
5.3.30.0140.04911.95
5.3.20.0090.03911.72
5.3.10.0130.05511.70
5.3.00.0120.04511.68
5.2.170.0100.0399.18
5.2.160.0030.0399.18
5.2.150.0090.0399.18
5.2.140.0070.0429.18
5.2.130.0160.0489.14
5.2.120.0080.0529.14
5.2.110.0080.0349.14
5.2.100.0050.0399.14
5.2.90.0070.0339.14
5.2.80.0050.0429.14
5.2.70.0080.0379.14
5.2.60.0050.0419.09
5.2.50.0100.0379.06
5.2.40.0040.0459.04
5.2.30.0090.0449.01
5.2.20.0060.0439.00
5.2.10.0060.0398.92
5.2.00.0090.0398.78
5.1.60.0050.0338.07
5.1.50.0080.0318.06
5.1.40.0090.0338.04
5.1.30.0080.0288.39
5.1.20.0090.0368.42
5.1.10.0080.0338.14
5.1.00.0110.0318.14
5.0.50.0110.0236.62
5.0.40.0100.0236.48
5.0.30.0070.0406.29
5.0.20.0090.0286.26
5.0.10.0050.0256.24
5.0.00.0080.0426.23
4.4.90.0030.0244.78
4.4.80.0050.0194.76
4.4.70.0050.0194.76
4.4.60.0090.0254.76
4.4.50.0070.0214.77
4.4.40.0070.0254.71
4.4.30.0030.0194.76
4.4.20.0060.0164.84
4.4.10.0050.0194.85
4.4.00.0030.0294.76
4.3.110.0020.0184.67
4.3.100.0070.0154.66
4.3.90.0040.0144.63
4.3.80.0040.0344.58
4.3.70.0090.0174.63
4.3.60.0050.0224.62
4.3.50.0060.0204.63
4.3.40.0220.0344.54
4.3.30.0160.0133.28
4.3.20.0050.0193.26
4.3.10.0050.0223.22
4.3.00.0130.02013.59

preferences:
38.39 ms | 401 KiB | 5 Q