3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_by_path($value, $path) { if (empty($path)) { return $value; } $curr = array_shift($path); if (!isset($value[$curr])) { return null; } elseif (is_array($value[$curr])) { return array_by_path($value[$curr]); } return $value; } $test = array( 'wot' => array( 'mate' => 'hello' ) ); echo array_by_path($test, ['wot', 'mate']);

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.01016.88
8.3.50.0150.00617.83
8.3.40.0100.00718.79
8.3.30.0110.00418.76
8.3.20.0050.00320.29
8.3.10.0030.00523.66
8.3.00.0070.00317.59
8.2.180.0070.01418.16
8.2.170.0080.00822.96
8.2.160.0100.00720.29
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00317.63
8.2.110.0060.00319.24
8.2.100.0090.00317.91
8.2.90.0000.00719.30
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0050.00321.19
8.2.30.0070.00020.51
8.2.20.0050.00317.82
8.2.10.0050.00318.18
8.2.00.0000.00718.16
8.1.280.0100.01025.92
8.1.270.0000.01520.61
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00623.79
8.1.230.0000.01121.04
8.1.220.0000.00817.78
8.1.210.0080.00018.77
8.1.200.0030.00617.23
8.1.190.0060.00317.35
8.1.180.0080.00018.10
8.1.170.0040.00419.06
8.1.160.0000.00721.95
8.1.150.0000.01118.78
8.1.140.0050.00319.50
8.1.130.0000.00817.82
8.1.120.0000.00717.48
8.1.110.0050.00217.50
8.1.100.0070.00017.36
8.1.90.0000.00717.50
8.1.80.0040.00317.36
8.1.70.0000.00717.46
8.1.60.0040.00417.56
8.1.50.0000.00917.52
8.1.40.0000.00817.45
8.1.30.0080.00017.60
8.1.20.0000.00817.63
8.1.10.0000.00717.68
8.1.00.0000.00717.54
8.0.300.0000.00918.77
8.0.290.0070.00016.75
8.0.280.0030.00318.50
8.0.270.0070.00016.86
8.0.260.0030.00318.47
8.0.250.0000.00616.93
8.0.240.0030.00516.98
8.0.230.0000.00716.92
8.0.220.0000.00716.84
8.0.210.0000.00717.00
8.0.200.0000.00816.99
8.0.190.0050.00317.05
8.0.180.0070.00016.88
8.0.170.0000.00816.94
8.0.160.0000.00717.04
8.0.150.0080.00016.95
8.0.140.0070.00016.95
8.0.130.0000.00713.35
8.0.120.0040.00416.89
8.0.110.0000.00817.00
8.0.100.0000.00716.97
8.0.90.0040.00417.00
8.0.80.0030.01316.92
8.0.70.0040.00417.04
8.0.60.0070.00016.86
8.0.50.0040.00417.01
8.0.30.0100.01017.23
8.0.20.0100.00817.40
8.0.10.0070.00016.96
8.0.00.0090.01016.86
7.4.330.0020.00215.08
7.4.320.0030.00316.57
7.4.300.0000.00616.45
7.4.290.0030.00316.64
7.4.280.0000.00816.51
7.4.270.0060.00316.41
7.4.260.0030.00316.49
7.4.250.0040.00416.40
7.4.240.0040.00416.50
7.4.230.0030.00316.62
7.4.220.0050.01316.61
7.4.210.0060.00916.46
7.4.200.0030.00616.57
7.4.160.0130.00616.41
7.4.150.0070.01017.40
7.4.140.0150.00417.86
7.4.130.0140.00416.50
7.4.120.0070.01016.49
7.4.110.0140.00316.38
7.4.100.0100.01316.48
7.4.90.0130.00316.56
7.4.80.0100.01319.39
7.4.70.0040.01616.56
7.4.60.0100.00616.59
7.4.50.0060.00316.46
7.4.40.0070.01016.56
7.4.30.0080.01116.66
7.4.00.0070.00715.18
7.3.330.0060.00013.27
7.3.320.0030.00313.41
7.3.310.0040.00416.48
7.3.300.0050.00216.29
7.3.290.0000.00716.37
7.3.280.0090.00916.45
7.3.270.0110.01117.40
7.3.260.0090.00916.34
7.3.250.0080.00916.32
7.3.240.0140.00616.38
7.3.230.0080.00816.60
7.3.210.0060.00916.64
7.3.200.0060.01616.36
7.3.190.0120.00616.63
7.3.180.0060.00916.50
7.3.170.0090.00616.39
7.3.160.0140.00316.42
7.2.330.0160.00016.72
7.2.320.0130.00316.83
7.2.310.0070.01016.85
7.2.300.0050.01016.87
7.2.290.0080.00816.56
7.2.60.0090.00316.96
7.2.00.0030.00919.67
7.1.200.0050.00515.85
7.1.100.0050.00517.89
7.1.70.0060.00317.33
7.1.60.0070.01719.11
7.1.50.0040.01117.06
7.1.00.0100.06722.43
7.0.200.0080.00816.77
7.0.60.0170.06019.87
7.0.50.0100.04317.89
7.0.40.0170.07320.22
7.0.30.0000.08720.30
7.0.20.0230.05320.24
7.0.10.0270.03720.10
7.0.00.0130.06720.08
5.6.280.0000.03721.06
5.6.210.0100.07720.67
5.6.200.0100.08018.18
5.6.190.0130.08020.33
5.6.180.0130.04720.48
5.6.170.0300.08720.46
5.6.160.0000.04720.54
5.6.150.0100.07718.18
5.6.140.0000.04318.18
5.6.130.0100.08718.27
5.6.120.0130.04321.12
5.6.110.0100.08021.03
5.6.100.0070.07021.07
5.6.90.0070.08320.98
5.6.80.0070.07720.38
5.6.70.4130.03320.29
5.5.350.0070.07720.39
5.5.340.0070.08318.05
5.5.330.0130.04720.27
5.5.320.4270.04020.34
5.5.310.0300.08020.34
5.5.300.0030.03718.00
5.5.290.0070.08317.99
5.5.280.0070.05020.90
5.5.270.0030.08020.76
5.5.260.0170.07720.86
5.5.250.0130.08320.58
5.5.240.0030.08020.23
5.4.450.0900.05719.49
5.4.440.0700.07319.70
5.4.430.0670.05719.58
5.4.420.0770.05319.33
5.4.410.0700.05019.48
5.4.400.0700.05019.03
5.4.390.0700.05019.28
5.4.380.0830.04319.29
5.4.370.0870.04719.28
5.4.360.0670.06019.16
5.4.350.0730.04719.37
5.4.340.0430.06319.28
5.4.320.0600.05018.87
5.4.310.0470.05719.38
5.4.300.0570.04719.28
5.4.290.0670.04019.14
5.4.280.0600.04718.84
5.4.270.0730.05719.05
5.4.260.0730.06018.84
5.4.250.0730.04719.21
5.4.240.0670.05019.14
5.4.230.0700.04718.87
5.4.220.0700.05019.14
5.4.210.0670.05018.84
5.4.200.0670.05019.25
5.4.190.0700.04719.13
5.4.180.0730.05319.27
5.4.170.0630.06019.00
5.4.160.0630.05319.27
5.4.150.0530.05318.96
5.4.140.0070.05316.35
5.4.130.0070.05016.46
5.4.120.0130.04316.55
5.4.110.0370.05016.28
5.4.100.0730.04316.62
5.4.90.0570.05316.28
5.4.80.0500.04716.24
5.4.70.0600.04016.58
5.4.60.0700.06716.64
5.4.50.0600.04016.58
5.4.40.0670.04716.50
5.4.30.0530.04716.58
5.4.20.0600.05316.36
5.4.10.0530.06316.16
5.4.00.0600.05316.00

preferences:
42.54 ms | 400 KiB | 5 Q