3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nested_array = array(); $temp = &$nested_array; $item = 'brachA-branchB-branchC'; foreach (explode('-', $item) as $key => $value) { $temp = &$temp[$value]; } print_r($nested_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.130.0040.00418.50
8.3.120.0110.00418.85
8.3.110.0000.00916.41
8.3.100.0030.00624.06
8.3.90.0040.00426.77
8.3.80.0090.00018.43
8.3.70.0110.00418.23
8.3.60.0140.00418.43
8.3.50.0050.01318.44
8.3.40.0140.00418.40
8.3.30.0160.00318.84
8.3.20.0000.00720.38
8.3.10.0040.00422.09
8.3.00.0040.00421.65
8.2.250.0060.00916.71
8.2.240.0040.00417.34
8.2.230.0060.00320.94
8.2.220.0030.00637.54
8.2.210.0040.00426.77
8.2.200.0060.00318.41
8.2.190.0100.01416.58
8.2.180.0100.01016.63
8.2.170.0110.01122.96
8.2.160.0110.00420.55
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0070.00019.09
8.2.120.0070.00026.35
8.2.110.0030.00720.35
8.2.100.0110.00017.91
8.2.90.0000.00817.84
8.2.80.0060.00319.17
8.2.70.0030.00617.75
8.2.60.0000.00817.63
8.2.50.0030.00518.10
8.2.40.0080.00021.15
8.2.30.0040.00419.20
8.2.20.0040.00418.00
8.2.10.0080.00018.06
8.2.00.0050.00218.12
8.1.300.0030.00620.26
8.1.290.0000.00918.88
8.1.280.0170.00025.92
8.1.270.0030.00622.04
8.1.260.0070.00026.35
8.1.250.0140.00428.09
8.1.240.0090.00019.21
8.1.230.0090.00322.77
8.1.220.0050.00317.76
8.1.210.0000.00818.77
8.1.200.0000.00817.66
8.1.190.0090.00017.35
8.1.180.0050.00318.10
8.1.170.0080.00018.68
8.1.160.0030.00318.94
8.1.150.0070.00018.90
8.1.140.0030.00517.64
8.1.130.0030.00318.93
8.1.120.0040.00417.37
8.1.110.0040.00417.36
8.1.100.0040.00417.41
8.1.90.0000.00717.46
8.1.80.0000.00717.49
8.1.70.0030.00317.51
8.1.60.0040.00417.55
8.1.50.0070.00017.55
8.1.40.0040.00417.41
8.1.30.0030.00617.64
8.1.20.0040.00417.66
8.1.10.0000.00717.33
8.1.00.0040.00417.22
8.0.300.0050.00320.01
8.0.290.0040.00416.75
8.0.280.0030.00318.40
8.0.270.0040.00416.80
8.0.260.0000.00718.43
8.0.250.0080.00016.97
8.0.240.0000.00716.94
8.0.230.0000.00816.98
8.0.220.0000.00716.83
8.0.210.0000.00816.79
8.0.200.0060.00016.79
8.0.190.0040.00416.93
8.0.180.0040.00416.89
8.0.170.0050.00316.93
8.0.160.0050.00216.97
8.0.150.0000.00816.79
8.0.140.0070.00016.81
8.0.130.0000.00613.27
8.0.120.0040.00416.86
8.0.110.0000.00716.75
8.0.100.0070.00016.84
8.0.90.0000.00816.96
8.0.80.0080.00816.77
8.0.70.0040.00416.83
8.0.60.0040.00416.85
8.0.50.0000.00816.73
8.0.30.0100.00717.09
8.0.20.0120.00817.40
8.0.10.0050.00316.90
8.0.00.0100.01016.63
7.4.330.0000.00515.55
7.4.320.0060.00016.50
7.4.300.0060.00016.57
7.4.290.0030.00316.55
7.4.280.0000.00716.50
7.4.270.0050.00316.61
7.4.260.0070.00016.45
7.4.250.0030.00516.56
7.4.240.0000.00716.54
7.4.230.0000.00716.25
7.4.220.0100.01016.50
7.4.210.0100.00816.57
7.4.200.0030.00316.30
7.4.160.0120.00316.58
7.4.150.0030.01517.40
7.4.140.0100.01017.86
7.4.130.0130.00716.29
7.4.120.0100.01116.58
7.4.110.0060.01216.49
7.4.100.0110.01016.29
7.4.90.0120.00616.55
7.4.80.0130.00719.39
7.4.70.0030.01716.49
7.4.60.0160.00016.58
7.4.50.0090.00916.62
7.4.40.0090.00916.59
7.4.30.0090.00916.59
7.4.00.0070.00714.82
7.3.330.0000.00513.09
7.3.320.0060.00013.19
7.3.310.0000.00716.28
7.3.300.0070.00016.29
7.3.290.0000.00816.13
7.3.280.0080.00816.26
7.3.270.0100.00717.40
7.3.260.0050.01316.34
7.3.250.0090.01016.32
7.3.240.0100.00816.36
7.3.230.0070.01016.37
7.3.210.0060.01216.32
7.3.200.0100.00716.25
7.3.190.0070.01716.41
7.3.180.0090.00916.65
7.3.170.0080.00816.41
7.3.160.0110.00616.28
7.3.120.0030.01415.01
7.3.110.0070.01114.59
7.3.100.0030.00914.70
7.3.90.0040.00814.73
7.3.80.0040.01114.84
7.3.70.0030.00614.79
7.3.60.0070.00314.79
7.3.50.0080.00414.48
7.3.40.0040.01114.65
7.3.30.0060.00914.71
7.3.20.0040.01216.62
7.3.10.0000.01516.66
7.3.00.0070.00716.55
7.2.330.0100.01316.46
7.2.320.0060.01016.86
7.2.310.0130.00316.46
7.2.300.0130.01016.72
7.2.290.0070.01016.69
7.2.250.0040.01514.97
7.2.240.0070.01314.78
7.2.230.0060.00314.92
7.2.220.0060.01215.04
7.2.210.0070.00415.22
7.2.200.0130.00315.06
7.2.190.0120.00314.77
7.2.180.0030.01214.89
7.2.170.0060.00915.13
7.2.60.0000.01116.99
7.1.330.0040.01215.96
7.1.320.0070.01015.74
7.1.310.0100.00315.73
7.1.300.0070.01015.56
7.1.290.0040.01115.67
7.1.280.0070.00715.80
7.1.270.0080.00415.89
7.1.260.0040.00815.73
7.1.200.0070.00715.50
7.1.100.6020.01017.91
7.1.90.0060.00918.15
7.1.80.0090.00818.15
7.1.70.0090.00916.97
7.1.60.0260.01035.16
7.1.50.0200.01334.50
7.1.40.0260.01334.23
7.1.30.0200.02134.42
7.1.20.0280.01634.35
7.1.10.0160.00616.55
7.1.00.0090.00616.56
7.0.240.0080.01117.84
7.0.230.0030.01317.84
7.0.220.0070.01117.69
7.0.210.0060.01616.59
7.0.200.0030.01316.79
7.0.190.0030.01316.58
7.0.180.0150.01116.16
7.0.170.0120.01416.01
7.0.160.0060.01716.07
7.0.150.0060.01516.05
7.0.140.0030.01415.96
7.0.130.0030.01916.36
7.0.120.0060.01616.48
7.0.110.0080.01616.31
7.0.100.0060.01316.30
7.0.90.0030.01516.14
7.0.80.0040.01516.25
7.0.70.0030.01316.18
7.0.60.0000.01616.09
7.0.50.0020.01516.25
7.0.40.0060.01516.45
7.0.30.0080.01416.45
7.0.20.0040.01716.39
7.0.10.0120.01216.31
7.0.00.0030.01916.48

preferences:
27.58 ms | 403 KiB | 5 Q