3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myData = [ 'config' => [ 'google' => [ 'api' => [ 'key'=> 'secret', ] ] ] ]; echo dotToIndex($myData, "config.google.api.key"); function dotToIndex($array, $string) { $parts = explode('.', $string); $element = $array; foreach ($parts as $part) { $element = $element[$part]; } return $element; }

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.140.0130.00817.66
8.4.130.0120.00817.63
8.4.120.0140.00722.37
8.4.110.0090.01118.63
8.4.100.0090.01217.70
8.4.90.0110.00717.80
8.4.80.0100.01017.54
8.4.70.0130.00717.78
8.4.60.0100.01118.50
8.4.50.0070.01219.52
8.4.40.0050.00317.86
8.4.30.0080.00822.25
8.4.20.0100.01019.63
8.4.10.0000.00917.57
8.3.270.0140.00616.85
8.3.260.0090.01016.72
8.3.250.0120.00718.83
8.3.240.0140.00616.54
8.3.230.0140.00416.60
8.3.220.0050.00317.29
8.3.210.0070.00716.39
8.3.200.0060.00316.68
8.3.190.0090.00517.08
8.3.180.0130.00616.69
8.3.170.0140.00018.95
8.3.160.0070.00718.29
8.3.150.0070.01318.92
8.3.140.0150.00416.70
8.3.130.0080.00018.35
8.3.120.0100.01320.75
8.3.110.0050.00318.19
8.3.100.0080.00024.06
8.3.90.0030.00626.77
8.3.80.0030.00719.36
8.3.70.0120.00316.63
8.3.60.0110.00416.63
8.3.50.0040.01118.10
8.3.40.0100.00720.74
8.3.30.0110.00418.71
8.3.20.0040.00424.18
8.3.10.0000.00824.66
8.3.00.0040.00426.16
8.2.290.0080.01120.44
8.2.280.0070.00518.45
8.2.270.0040.01517.09
8.2.260.0140.00418.66
8.2.250.0090.00016.81
8.2.240.0040.01116.95
8.2.230.0030.00620.94
8.2.220.0040.00437.54
8.2.210.0070.00726.77
8.2.200.0030.00618.88
8.2.190.0110.00416.58
8.2.180.0110.00725.92
8.2.170.0100.01018.95
8.2.160.0100.00322.96
8.2.150.0000.00725.66
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0070.00320.63
8.2.110.0060.00322.24
8.2.100.0060.00617.91
8.2.90.0040.00417.63
8.2.80.0060.00318.73
8.2.70.0000.00817.75
8.2.60.0040.00417.63
8.2.50.0040.00418.05
8.2.40.0000.00821.11
8.2.30.0000.00717.74
8.2.20.0040.00418.00
8.2.10.0040.00418.99
8.2.00.0040.00419.37
8.1.330.0140.00522.15
8.1.320.0120.00816.33
8.1.310.0090.00618.50
8.1.300.0060.00318.32
8.1.290.0030.00630.84
8.1.280.0100.00725.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00423.86
8.1.230.0030.00720.88
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0000.00817.36
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0040.00417.62
8.1.160.0030.00518.76
8.1.150.0030.00518.67
8.1.140.0040.00417.45
8.1.130.0000.00718.95
8.1.120.0030.00317.35
8.1.110.0000.00717.44
8.1.100.0000.00717.39
8.1.90.0070.00017.45
8.1.80.0050.00217.38
8.1.70.0000.00717.41
8.1.60.0030.00517.48
8.1.50.0090.00017.50
8.1.40.0000.00717.51
8.1.30.0040.00417.69
8.1.20.0050.00317.63
8.1.10.0000.00817.57
8.1.00.0000.00717.49
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0000.00718.44
8.0.270.0040.00416.82
8.0.260.0050.00318.36
8.0.250.0080.00016.85
8.0.240.0080.00016.97
8.0.230.0030.00316.91
8.0.220.0070.00016.80
8.0.210.0000.00716.88
8.0.200.0030.00316.91
8.0.190.0020.00516.93
8.0.180.0000.00716.88
8.0.170.0060.00316.85
8.0.160.0000.00816.92
8.0.150.0000.00816.73
8.0.140.0000.00816.86
8.0.130.0040.00413.21
8.0.120.0030.00516.85
8.0.110.0000.00716.91
8.0.100.0000.00916.88
8.0.90.0080.00016.91
8.0.80.0090.00016.99
8.0.70.0040.00416.79
8.0.60.0080.00016.75
8.0.50.0030.00616.81
8.0.30.0030.00617.00
8.0.20.0000.00816.82
8.0.10.0000.00716.93
8.0.00.0000.00717.03
7.4.330.0020.00215.55
7.4.320.0000.00616.51
7.4.300.0030.00316.54
7.4.290.0060.00016.51
7.4.280.0040.00416.58
7.4.270.0040.00416.57
7.4.260.0050.00013.31
7.4.250.0030.00316.49
7.4.240.0000.00716.47
7.4.230.0040.00416.62
7.4.220.0030.00616.34
7.4.210.0070.00016.68
7.4.200.0050.00216.67
7.4.190.0030.00316.66
7.4.180.0060.00316.68
7.4.160.0040.00416.46
7.4.150.0030.00316.25
7.4.140.0050.00216.32
7.4.130.0070.00016.58
7.4.120.0000.00716.50
7.4.110.0040.00416.27
7.4.100.0070.00016.34
7.4.90.0030.00316.64
7.4.80.0040.00416.29
7.4.70.0000.00716.25
7.4.60.0000.00716.24
7.4.50.0000.00716.30
7.4.40.0040.00416.50
7.4.30.0030.00516.53
7.4.20.0040.00416.51
7.4.10.0000.00816.48
7.4.00.0030.00616.25
7.3.330.0060.00016.15
7.3.320.0030.00313.34
7.3.310.0040.00416.32
7.3.300.0040.00416.28
7.3.290.0040.00416.37
7.3.280.0070.00016.29
7.3.270.0030.00316.23
7.3.260.0040.00416.38
7.3.250.0040.00416.37
7.3.240.0030.00316.41
7.3.230.0000.00716.24
7.3.220.0070.00016.23
7.3.210.0030.00316.35
7.3.200.0050.00216.12
7.3.190.0040.00416.26
7.3.180.0030.00316.26
7.3.170.0000.00716.29
7.3.160.0000.00716.26
7.3.150.0030.00316.12
7.3.140.0000.00716.17
7.3.130.0070.00016.31
7.3.120.0030.00616.27
7.3.110.0060.00016.25
7.3.100.0030.00316.13
7.3.90.0030.00316.61
7.3.80.0000.00716.29
7.3.70.0050.00216.31
7.3.60.0070.00016.42
7.3.50.0070.00016.50
7.3.40.0040.00416.34
7.3.30.0030.00316.49
7.3.20.0040.00418.15
7.3.10.0040.00418.24
7.3.00.0080.00018.08

preferences:
34.73 ms | 403 KiB | 5 Q