3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 'one' => array('one' => 11, 'two' =>12), 'two' => array('one' => 21, 'two' => 22) ); $s = "one,two"; $res = $a; foreach(explode(",", $s) as $item){ $res = $res[$item]; } echo $res;

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.4.130.0090.01018.91
8.4.120.0030.00524.05
8.4.110.0130.00720.59
8.4.100.0140.00717.79
8.4.90.0130.00717.61
8.4.80.0030.00517.72
8.4.70.0130.00817.76
8.4.60.0130.00818.62
8.4.50.0110.00917.72
8.4.40.0130.00719.28
8.4.30.0060.00318.61
8.4.20.0130.00720.35
8.4.10.0130.00319.55
8.3.260.0120.00516.57
8.3.250.0050.00318.76
8.3.240.0050.00317.06
8.3.230.0120.00716.37
8.3.220.0060.00817.13
8.3.210.0030.00516.59
8.3.200.0020.00716.65
8.3.190.0050.00317.06
8.3.180.0090.00918.81
8.3.170.0090.00917.10
8.3.160.0090.00916.70
8.3.150.0090.00920.52
8.3.140.0030.00717.11
8.3.130.0080.00018.35
8.3.120.0060.00318.79
8.3.110.0070.00720.94
8.3.100.0030.00624.06
8.3.90.0060.00326.77
8.3.80.0030.00619.36
8.3.70.0090.00618.18
8.3.60.0040.01116.38
8.3.50.0110.01023.58
8.3.40.0070.01018.88
8.3.30.0120.00318.60
8.3.20.0040.00420.65
8.3.10.0000.00723.67
8.3.00.0040.00421.98
8.2.290.0130.00620.23
8.2.280.0050.00418.85
8.2.270.0140.00417.15
8.2.260.0080.01116.80
8.2.250.0080.00020.79
8.2.240.0070.01117.27
8.2.230.0040.00422.58
8.2.220.0060.00337.54
8.2.210.0070.00026.77
8.2.200.0050.00518.88
8.2.190.0150.00318.41
8.2.180.0060.00918.32
8.2.170.0090.00622.96
8.2.160.0080.00522.08
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00819.89
8.2.110.0060.00321.06
8.2.100.0110.00717.84
8.2.90.0060.00317.75
8.2.80.0030.00618.73
8.2.70.0080.00017.63
8.2.60.0000.00818.03
8.2.50.0050.00318.05
8.2.40.0030.00619.92
8.2.30.0030.00319.43
8.2.20.0040.00418.01
8.2.10.0040.00419.22
8.2.00.0000.00719.22
8.1.330.0100.01016.53
8.1.320.0100.00815.95
8.1.310.0170.00020.21
8.1.300.0080.00018.39
8.1.290.0070.00330.84
8.1.280.0140.00725.92
8.1.270.0040.00420.77
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.05
8.1.230.0040.00820.85
8.1.220.0000.00717.79
8.1.210.0030.00618.97
8.1.200.0060.00317.35
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0000.00818.36
8.1.160.0000.00718.89
8.1.150.0000.00718.94
8.1.140.0030.00520.69
8.1.130.0030.00321.96
8.1.120.0030.00317.49
8.1.110.0030.00317.45
8.1.100.0000.00917.41
8.1.90.0080.00017.46
8.1.80.0090.00017.50
8.1.70.0050.00217.45
8.1.60.0040.00417.46
8.1.50.0000.00717.48
8.1.40.0050.00317.52
8.1.30.0040.00417.65
8.1.20.0000.00917.66
8.1.10.0090.00017.58
8.1.00.0050.00317.46
8.0.300.0000.00720.16
8.0.290.0040.00416.75
8.0.280.0070.00018.35
8.0.270.0040.00417.91
8.0.260.0040.00420.01
8.0.250.0000.00816.93
8.0.240.0070.00016.96
8.0.230.0030.00316.93
8.0.220.0040.00416.84
8.0.210.0000.00616.82
8.0.200.0040.00416.93
8.0.190.0060.00316.95
8.0.180.0050.00316.91
8.0.170.0090.00016.91
8.0.160.0000.00916.90
8.0.150.0000.00816.78
8.0.140.0020.00516.80
8.0.130.0040.00413.30
8.0.120.0000.00716.88
8.0.110.0040.00416.70
8.0.100.0040.00416.74
8.0.90.0040.00416.84
8.0.80.0090.00916.88
8.0.70.0050.00216.84
8.0.60.0000.00716.68
8.0.50.0050.00216.77
8.0.30.0110.00616.86
8.0.20.0030.01616.93
8.0.10.0000.00817.07
8.0.00.0170.00016.70
7.4.330.0050.00016.66
7.4.320.0060.00016.44
7.4.300.0000.00716.58
7.4.290.0000.00716.52
7.4.280.0110.00016.62
7.4.270.0060.00316.39
7.4.260.0060.00013.23
7.4.250.0040.00416.55
7.4.240.0020.00516.63
7.4.230.0070.00016.29
7.4.220.0060.00216.38
7.4.210.0080.00916.48
7.4.200.0070.00016.34
7.4.130.0130.01016.40
7.4.120.0130.01016.69
7.4.110.0070.01116.48
7.4.100.0060.01316.58
7.4.90.0070.01016.34
7.4.80.0170.00019.39
7.4.70.0090.00616.38
7.4.60.0120.00916.34
7.4.50.0060.00916.29
7.4.40.0050.01716.47
7.4.10.0090.00616.54
7.4.00.0100.00716.59
7.3.330.0060.00016.46
7.3.320.0000.00513.16
7.3.310.0000.00716.39
7.3.300.0030.00316.12
7.3.290.0080.00816.32
7.3.260.0100.00716.69
7.3.230.0100.00616.51
7.3.210.0080.00816.27
7.3.200.0100.00616.64
7.3.190.0090.01316.36
7.3.180.0030.01316.39
7.3.170.0100.01416.60
7.3.160.0130.00316.51
7.3.130.0080.00816.45
7.3.120.0120.00316.50
7.3.110.0080.00816.44
7.3.100.0000.01616.32
7.3.90.0060.00916.34
7.3.80.0110.00416.46
7.3.70.0070.01016.05
7.3.60.0130.00716.23
7.3.50.0100.00716.30
7.3.40.0120.00316.39
7.3.30.0100.00716.19
7.3.20.0060.00916.46
7.3.10.0090.00916.27
7.3.00.0080.01116.26
7.2.330.0060.01216.80
7.2.320.0130.00616.61
7.2.310.0110.01116.45
7.2.300.0060.01616.73
7.2.290.0150.00816.65
7.2.260.0100.00716.46
7.2.250.0060.01016.49
7.2.240.0040.01116.52
7.2.230.0040.01116.55
7.2.220.0000.01516.71
7.2.210.0000.01516.62
7.2.200.0130.00316.36
7.2.190.0100.00716.50
7.2.180.0120.00316.55
7.2.170.0050.01116.36
7.2.160.0040.01116.56
7.2.150.0460.01316.62
7.2.140.0170.00316.54
7.2.130.0060.01316.67
7.2.120.0090.00916.54
7.2.110.0060.00916.64
7.2.100.0000.01516.63
7.2.90.0100.00716.45
7.2.80.0160.00516.64
7.2.70.0070.01016.61
7.2.60.0090.01216.56
7.2.50.0060.00916.66
7.2.40.0160.00316.63
7.2.30.0060.01016.65
7.2.20.0100.00616.72
7.2.10.0090.00616.80
7.2.00.0100.00716.70

preferences:
128.16 ms | 403 KiB | 5 Q