3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = '{"uuid":"8888888888888","templateUuid":"001","trashed":"N","createdAt":"2018-09-05T07:52:37Z","updatedAt":"2019-01-24T18:45:35Z","changerUuid":"HHHHHHHHHHHHHH","itemVersion":7,"vaultUuid":"VVVVVVVVVVVVVVVVV","details":{"fields":[{"designation":"username","name":"username","type":"T","value":"33333333333333333333333333"},{"designation":"password","name":"password","type":"P","value":"9999999999999999999999999"}],"notesPlain":"aa","sections":[{"fields":[{"k":"concealed","n":"fffffffffffffffff","t":"custom","v":"something"}],"name":"Section_acydazbajjhifgnahiej3wdrxi","title":""}]},"overview":{"URLs":[{"l":"website","u":"https://api.example.com/"}],"ainfo":"33453ff2e19203cacb35dac4b304f4d3e69020a8","pbe":0,"pgrng":false,"ps":100,"tags":[],"title":"EXAMPLE API KEY","url":"https://api.example.com/"}}'; //echo print_r(json_decode($array, true), true); function findPath($array, $targetKey, $targetValue, $path = []) : ? string { if (!is_array($array)) { $array = json_decode($array, true); } foreach ($array as $key => $value) { if ($key === $targetKey && $value === $targetValue) { $path[] = $key; return implode('.', $path); } } foreach ($array as $key => $value) { if (is_array($value)) { $path[] = $key; if (($result = findPath($value, $targetKey, $targetValue, $path)) !== null) { return $result; } else { array_pop($path); } } } return null; } echo print_r(findPath($array, 'url', 'https://api.example.com/'), true);

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.0110.01118.31
8.3.50.0040.01116.50
8.3.40.0090.00618.67
8.3.30.0100.00618.89
8.3.20.0050.00321.88
8.3.10.0080.00020.48
8.3.00.0090.00019.38
8.2.180.0060.00918.41
8.2.170.0110.00719.09
8.2.160.0140.00022.96
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00719.95
8.2.120.0050.00226.35
8.2.110.0030.00720.43
8.2.100.0090.00617.97
8.2.90.0000.00817.75
8.2.80.0000.00817.97
8.2.70.0080.00017.80
8.2.60.0060.00318.22
8.2.50.0090.00018.10
8.2.40.0070.00019.39
8.2.30.0000.00719.21
8.2.20.0000.00718.14
8.2.10.0000.00719.51
8.2.00.0040.00418.13
8.1.280.0080.00825.92
8.1.270.0040.00420.33
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00523.83
8.1.230.0090.00319.01
8.1.220.0030.00517.80
8.1.210.0080.00018.77
8.1.200.0030.00617.22
8.1.190.0000.00817.25
8.1.180.0030.00518.10
8.1.170.0060.00318.43
8.1.160.0000.00718.98
8.1.150.0000.00818.84
8.1.140.0040.00418.79
8.1.130.0040.00420.16
8.1.120.0040.00717.48
8.1.110.0040.00417.43
8.1.100.0090.00017.48
8.1.90.0000.00817.43
8.1.80.0030.00617.54
8.1.70.0070.00017.45
8.1.60.0080.00017.54
8.1.50.0000.00817.43
8.1.40.0030.00617.48
8.1.30.0050.00217.52
8.1.20.0040.00817.74
8.1.10.0030.00617.61
8.1.00.0050.00317.41
8.0.300.0040.00419.70
8.0.290.0060.00316.75
8.0.280.0070.00018.49
8.0.270.0030.00317.33
8.0.260.0030.00318.46
8.0.250.0040.00416.95
8.0.240.0030.00317.00
8.0.230.0080.00016.88
8.0.220.0000.00716.83
8.0.210.0000.00716.88
8.0.200.0000.00816.89
8.0.190.0000.00716.98
8.0.180.0040.00416.86
8.0.170.0040.00416.87
8.0.160.0040.00416.89
8.0.150.0030.00616.89
8.0.140.0080.00016.86
8.0.130.0050.00013.31
8.0.120.0050.00316.88
8.0.110.0040.00416.87
8.0.100.0050.00316.94
8.0.90.0060.00316.89
8.0.80.0130.00716.91
8.0.70.0040.00416.87
8.0.60.0030.00516.96
8.0.50.0000.00716.91
8.0.30.0110.00916.89
8.0.20.0130.00816.98
8.0.10.0040.00416.87
8.0.00.0160.00716.76
7.4.330.0030.00315.55
7.4.320.0000.00716.57
7.4.300.0030.00316.54
7.4.290.0000.00816.52
7.4.280.0070.00016.56
7.4.270.0030.00616.57
7.4.260.0030.00516.63
7.4.250.0000.00716.57
7.4.240.0000.00716.55
7.4.230.0070.00016.59
7.4.220.0040.00416.71
7.4.210.0080.00816.56
7.4.200.0050.00316.51
7.4.160.0100.00816.58
7.4.140.0110.00817.86
7.4.130.0120.00616.50
7.4.120.0080.01116.45
7.4.110.0070.01116.51
7.4.100.0100.01016.66
7.4.90.0060.01216.62
7.4.80.0060.01019.39
7.4.70.0060.01016.41
7.4.60.0070.01016.35
7.4.50.0120.00316.65
7.4.40.0130.00316.50
7.4.00.0110.00315.22
7.3.330.0050.00013.36
7.3.320.0000.00513.29
7.3.310.0040.00416.39
7.3.300.0030.00316.37
7.3.290.0070.00016.20
7.3.280.0080.01216.34
7.3.260.0080.01216.53
7.3.240.0080.01216.51
7.3.230.0130.00316.43
7.3.210.0140.00316.38
7.3.200.0130.00916.74
7.3.190.0130.01016.46
7.3.180.0090.00916.52
7.3.170.0030.01616.49
7.3.160.0120.00616.59
7.3.20.1630.00714.64
7.3.10.2400.00314.59
7.3.00.1950.00714.75
7.2.330.0090.00916.60
7.2.320.0110.00916.79
7.2.310.0090.00916.68
7.2.300.0070.01016.49
7.2.290.0070.01116.75
7.2.150.1570.01014.94
7.2.140.2570.01314.97
7.2.130.2460.01014.86
7.2.120.2030.00314.94
7.2.110.2000.00715.07
7.2.100.2240.00715.06
7.2.90.1680.00314.95
7.2.80.3000.00714.98
7.2.70.2720.00714.88
7.2.60.2160.00314.69
7.2.50.2250.00314.67
7.2.40.2560.01014.98
7.2.30.2100.00614.75
7.2.20.2060.00314.78
7.2.10.2560.00314.52
7.2.00.3270.00715.15
7.1.250.2100.02013.90

preferences:
64.2 ms | 401 KiB | 5 Q