3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'plants'=>[ 'fruits'=>['hard'=>'coconut','juicy'=>'mango'], 'non-edible'=>'bambo' ], 'professions'=>[ 'service'=>[ 'contractors'=>['math'=>'accountant'] ], 'industry'=>'engineer' ], 'my_jobs'=>['first'=>'bartender','recent'=>'engineer'] ]; function pathFinder($target, array $source, $parentPath=''){ $results=[]; foreach($source as $k => $v){ $path = $parentPath.'/'.$k; //current path //if element is array, recurse and import found results if(is_array($v) && $result=pathFinder($target, $v,$path)){ foreach($result as $r) array_push($results,$r); } elseif($v===$target) $results[]=$path; //add any match to results } return $results; } print_r(pathFinder('engineer',$array)); print_r(pathFinder('missing data',$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.5.10.0100.00720.13
8.5.00.0140.00819.84
8.4.150.0020.00014.05
8.4.140.0130.00817.66
8.4.130.0120.00918.73
8.4.120.0110.00924.15
8.4.110.0100.01018.55
8.4.100.0120.00818.71
8.4.90.0090.01020.81
8.4.80.0030.00618.72
8.4.70.0050.00318.05
8.4.60.0120.00718.80
8.4.50.0090.01020.65
8.4.40.0130.00723.95
8.4.30.0040.01617.74
8.4.20.0100.01017.61
8.4.10.0000.00917.50
8.3.280.0110.00918.46
8.3.270.0150.00416.71
8.3.260.0130.00616.52
8.3.250.0120.00618.62
8.3.240.0110.00716.99
8.3.230.0070.01016.54
8.3.220.0040.00519.10
8.3.210.0070.00818.52
8.3.200.0100.01116.76
8.3.190.0080.00617.14
8.3.180.0100.00816.46
8.3.170.0180.00017.09
8.3.160.0100.01020.18
8.3.150.0090.00917.31
8.3.140.0040.01416.98
8.3.130.0090.00016.36
8.3.120.0090.00618.88
8.3.110.0160.00016.40
8.3.100.0080.00024.06
8.3.90.0070.00726.77
8.3.80.0060.00318.68
8.3.70.0120.00316.50
8.3.60.0140.00716.50
8.3.50.0120.00621.97
8.3.40.0070.00718.58
8.3.30.0070.00718.85
8.3.20.0070.00021.85
8.3.10.0000.00821.73
8.3.00.0040.00419.68
8.2.290.0100.00816.62
8.2.280.0110.00918.40
8.2.270.0050.00317.37
8.2.260.0190.00016.63
8.2.250.0060.00316.94
8.2.240.0160.00317.09
8.2.230.0040.00420.94
8.2.220.0040.01137.54
8.2.210.0040.00426.77
8.2.200.0000.00918.41
8.2.190.0070.00718.29
8.2.180.0140.00018.05
8.2.170.0070.01422.96
8.2.160.0070.00718.95
8.2.150.0090.00024.18
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0040.00419.66
8.2.110.0030.00721.00
8.2.100.0110.00018.16
8.2.90.0080.00019.34
8.2.80.0090.00017.97
8.2.70.0100.00017.50
8.2.60.0000.00818.03
8.2.50.0030.00518.10
8.2.40.0030.00620.42
8.2.30.0070.00019.33
8.2.20.0050.00217.77
8.2.10.0000.00718.25
8.2.00.0060.00318.05
8.1.330.0110.00422.11
8.1.320.0110.00816.16
8.1.310.0050.00518.30
8.1.300.0120.00418.32
8.1.290.0030.00630.84
8.1.280.0100.00725.92
8.1.270.0050.00323.84
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0100.00022.06
8.1.230.0080.00317.89
8.1.220.0040.00417.77
8.1.210.0050.00318.77
8.1.200.0040.00417.36
8.1.190.0030.00617.23
8.1.180.0040.00418.10
8.1.170.0080.00018.50
8.1.160.0050.00222.10
8.1.150.0040.00418.91
8.1.140.0070.00019.47
8.1.130.0000.00717.71
8.1.120.0030.00517.50
8.1.110.0100.00017.47
8.1.100.0040.00417.37
8.1.90.0070.00017.37
8.1.80.0000.00817.46
8.1.70.0030.00317.46
8.1.60.0040.00417.61
8.1.50.0030.00617.51
8.1.40.0040.00417.54
8.1.30.0040.00417.50
8.1.20.0040.00417.52
8.1.10.0000.00717.56
8.1.00.0080.00417.36
8.0.300.0090.00018.77
8.0.290.0080.00016.63
8.0.280.0030.00518.38
8.0.270.0000.00817.33
8.0.260.0030.00317.15
8.0.250.0040.00417.02
8.0.240.0030.00317.02
8.0.230.0000.00716.94
8.0.220.0030.00316.90
8.0.210.0060.00016.95
8.0.200.0030.00316.96
8.0.190.0030.00517.01
8.0.180.0000.00816.95
8.0.170.0060.00316.92
8.0.160.0050.00316.96
8.0.150.0070.00416.91
8.0.140.0050.00316.93
8.0.130.0030.00313.35
8.0.120.0050.00316.91
8.0.110.0000.00816.80
8.0.100.0040.00416.90
8.0.90.0040.00416.96
8.0.80.0070.00716.88
8.0.70.0000.00816.72
8.0.60.0040.00416.91
8.0.50.0070.00017.02
8.0.30.0150.00817.13
8.0.20.0120.00817.42
8.0.10.0040.00416.95
8.0.00.0110.01116.84
7.4.330.0000.00515.08
7.4.320.0030.00316.61
7.4.300.0030.00516.54
7.4.290.0030.00316.60
7.4.280.0050.00216.51
7.4.270.0030.00316.59
7.4.260.0040.00416.43
7.4.250.0000.00716.48
7.4.240.0030.00316.50
7.4.230.0030.00316.61
7.4.220.0090.01316.57
7.4.210.0110.00416.62
7.4.200.0040.00416.52
7.4.150.0100.00717.40
7.4.140.0100.01517.86
7.4.130.0110.00716.46
7.4.120.0080.00916.49
7.4.110.0070.01016.50
7.4.100.0100.00616.58
7.4.90.0140.00416.76
7.4.80.0120.00419.39
7.4.70.0070.01016.50
7.4.60.0100.01316.54
7.4.50.0040.01116.50
7.4.40.0050.01316.37
7.4.30.0060.01016.37
7.4.00.0030.01014.70
7.3.330.0030.00213.25
7.3.320.0060.00013.25
7.3.310.0050.00216.43
7.3.300.0000.00616.30
7.3.290.0070.00816.36
7.3.280.0110.00616.37
7.3.270.0150.00417.40
7.3.260.0090.01116.57
7.3.250.0080.01016.59
7.3.240.0100.00716.55
7.3.230.0030.01416.39
7.3.210.0090.00916.46
7.3.200.0130.00316.39
7.3.190.0070.01116.63
7.3.180.0070.01016.43
7.3.170.0060.01016.58
7.3.160.0090.00916.41
7.3.60.0060.01214.67
7.3.50.0100.00814.73
7.3.40.0020.01014.71
7.3.30.0060.00914.82
7.3.20.0080.00516.66
7.3.10.0050.00916.56
7.3.00.0070.00716.57
7.2.330.0090.00916.61
7.2.320.0060.01116.48
7.2.310.0070.01116.54
7.2.300.0060.01216.84
7.2.290.0030.01716.35
7.2.190.0070.00714.99
7.2.180.0070.00514.83
7.2.170.0110.00714.81
7.2.160.0120.00115.00
7.2.150.0100.00516.97
7.2.140.0080.00717.04
7.2.130.0130.00516.72
7.2.120.0060.01216.59
7.2.110.0090.00516.76
7.2.100.0080.00716.71
7.2.90.0070.00816.78
7.2.80.0130.00716.72
7.2.70.0110.00816.95
7.2.60.0090.00916.80
7.2.50.0090.00716.88
7.2.40.0120.00416.89
7.2.30.0090.00816.91
7.2.20.0070.00916.85
7.2.10.0060.01316.86
7.2.00.0100.00817.53
7.1.300.0070.00715.46
7.1.290.0130.01015.84
7.1.280.0060.00915.70
7.1.270.0090.00215.65
7.1.260.0080.00415.63
7.1.250.0110.00615.72
7.1.240.0070.00915.61
7.1.230.0080.00815.81
7.1.220.0080.00815.79
7.1.210.0090.00815.84
7.1.200.0120.00715.69
7.1.190.0110.00715.74
7.1.180.0090.01115.72
7.1.170.0150.00415.69
7.1.160.0130.00715.68
7.1.150.0130.00615.61
7.1.140.0070.01115.80
7.1.130.0100.00615.66
7.1.120.0100.01015.69
7.1.110.0090.00915.70
7.1.100.0110.00815.79
7.1.90.0110.00915.79
7.1.80.0080.00715.79
7.1.70.0090.00816.19
7.1.60.0080.00716.72
7.1.50.0080.00815.81
7.1.40.0130.00915.61
7.1.30.0070.00915.77
7.1.20.0090.00315.72
7.1.10.0110.01115.75
7.1.00.0080.02417.46
7.0.330.0090.01115.42
7.0.320.0120.00815.36
7.0.310.0110.01315.28
7.0.300.0150.00815.27
7.0.290.0120.00715.38
7.0.280.0070.01015.15
7.0.270.0130.00615.45
7.0.260.0100.01215.35
7.0.250.0110.00815.21
7.0.240.0100.01015.33
7.0.230.0110.00515.31
7.0.220.0140.00515.44
7.0.210.0100.01015.22
7.0.200.0130.00715.26
7.0.190.0140.00415.36
7.0.180.0140.00615.43
7.0.170.0120.01015.40
7.0.160.0130.00915.16
7.0.150.0130.00515.43
7.0.140.0100.01115.33
7.0.130.0160.00315.35
7.0.120.0140.00815.30
7.0.110.0140.01215.28
7.0.100.0150.00715.54
7.0.90.0180.02416.47
7.0.80.0210.02616.48
7.0.70.0180.02716.48
7.0.60.0160.02416.48
7.0.50.0160.02216.53
7.0.40.0120.02116.21
7.0.30.0140.02016.15
7.0.20.0220.02516.06
7.0.10.0200.01616.06
7.0.00.0210.02016.08
5.6.400.0090.01214.58
5.6.390.0160.00414.47
5.6.380.0150.00914.46
5.6.370.0120.01014.36
5.6.360.0140.00514.64
5.6.350.0130.01114.44
5.6.340.0130.00614.40
5.6.330.0110.00914.27
5.6.320.0210.00714.54
5.6.310.0130.00514.37
5.6.300.0080.01214.45
5.6.290.0170.00714.67
5.6.280.0110.01214.34
5.6.270.0170.01014.42
5.6.260.0090.01714.60
5.6.250.0100.00814.43
5.6.240.0160.02615.93
5.6.230.0140.02016.04
5.6.220.0140.02415.88
5.6.210.0130.02516.06
5.6.200.0170.02216.05
5.6.190.0120.02116.02
5.6.180.0150.02415.99
5.6.170.0110.02116.09
5.6.160.0140.02516.05
5.6.150.0110.02315.96
5.6.140.0100.02316.05
5.6.130.0110.02516.01
5.6.120.0120.02315.98
5.6.110.0100.02316.01
5.6.100.0140.01615.99
5.6.90.0140.02316.03
5.6.80.0120.02315.82
5.6.70.0130.02315.86
5.6.60.0060.02315.80
5.6.50.0120.01815.81
5.6.40.0110.02215.82
5.6.30.0100.02215.78
5.6.20.0110.02415.67
5.6.10.0140.02115.84
5.6.00.0150.01815.87

preferences:
36.24 ms | 403 KiB | 5 Q