3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array("farm" => array("animals"=> array("horses" => array("fred" => "fred", "sam" => "sam", "alan" => "alan", "john" => "john") ) ) ); $search = 'horses'; get_values($arr); function get_values($arr){ global $search; foreach($arr as $key => $value){ if($key == $search){ if(is_array($value)){ $keys = array_keys($value); if(count($keys) > 1){ for($i = 0; $i < count($keys); $i++){ echo '<a href="mypage.php?id=2&dir='.$keys[$i].'"><li>'.$keys[$i].'</li></a>'; } }else{ echo '<a href="mypage.php?id=2&dir='.$keys[0].'"><li>'.$keys[0].'</li></a>'; } } else{ echo $value; } }else{ get_values($value); } } } ?>

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.120.0040.00523.95
8.4.110.0130.00720.80
8.4.100.0160.00518.84
8.4.90.0140.00720.57
8.4.80.0110.00818.83
8.4.70.0100.01018.05
8.4.60.0120.00918.89
8.4.50.0110.00622.12
8.4.40.0120.00619.55
8.4.30.0040.00417.84
8.4.20.0170.00317.45
8.4.10.0040.01817.87
8.3.250.0130.00618.82
8.3.240.0140.00516.68
8.3.230.0100.01016.43
8.3.220.0120.00618.73
8.3.210.0140.00616.41
8.3.200.0050.00416.57
8.3.190.0030.00518.90
8.3.180.0080.01016.44
8.3.170.0060.00918.73
8.3.160.0060.01217.13
8.3.150.0070.01120.81
8.3.140.0090.00918.92
8.3.130.0030.00618.61
8.3.120.0040.01420.77
8.3.110.0040.00420.94
8.3.100.0080.00824.06
8.3.90.0080.00026.77
8.3.80.0040.00719.36
8.3.70.0100.00516.58
8.3.60.0120.00616.75
8.3.50.0090.00721.15
8.3.40.0120.00318.67
8.3.30.0110.00318.85
8.3.20.0080.00018.57
8.3.10.0080.00021.85
8.3.00.0040.00419.56
8.2.290.0090.01018.96
8.2.280.0100.00918.51
8.2.270.0120.00617.59
8.2.260.0030.00620.12
8.2.250.0050.00316.88
8.2.240.0130.00617.14
8.2.230.0090.00622.58
8.2.220.0070.01337.54
8.2.210.0140.00426.77
8.2.200.0060.00318.88
8.2.190.0120.00316.58
8.2.180.0130.00316.75
8.2.170.0140.00322.96
8.2.160.0080.00619.20
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0060.00321.07
8.2.110.0100.00021.06
8.2.100.0110.00017.80
8.2.90.0040.00419.21
8.2.80.0060.00317.97
8.2.70.0040.00417.60
8.2.60.0040.00417.93
8.2.50.0000.00818.10
8.2.40.0040.00420.59
8.2.30.0000.00720.71
8.2.20.0000.00717.83
8.2.10.0050.00218.20
8.2.00.0030.00518.02
8.1.330.0140.00416.94
8.1.320.0130.00616.05
8.1.310.0150.00318.50
8.1.300.0040.00820.37
8.1.290.0030.00630.84
8.1.280.0070.01325.92
8.1.270.0040.00423.81
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0060.00322.06
8.1.230.0080.00317.42
8.1.220.0030.00617.89
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0040.00418.95
8.1.160.0000.00718.90
8.1.150.0000.00718.91
8.1.140.0040.00419.57
8.1.130.0060.00317.42
8.1.120.0040.00417.51
8.1.110.0050.00317.48
8.1.100.0040.00417.49
8.1.90.0080.00017.39
8.1.80.0000.00717.50
8.1.70.0000.00717.49
8.1.60.0000.00817.64
8.1.50.0060.00617.46
8.1.40.0040.00417.58
8.1.30.0050.00317.59
8.1.20.0040.00417.68
8.1.10.0050.00317.59
8.1.00.0000.00917.55
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00718.47
8.0.270.0030.00317.28
8.0.260.0000.00716.76
8.0.250.0000.00716.89
8.0.240.0050.00316.89
8.0.230.0070.00016.96
8.0.220.0030.00516.94
8.0.210.0070.00016.96
8.0.200.0000.01016.96
8.0.190.0080.00016.97
8.0.180.0000.01016.90
8.0.170.0040.00416.88
8.0.160.0000.00717.05
8.0.150.0000.00716.76
8.0.140.0070.00016.88
8.0.130.0030.00613.32
8.0.120.0000.00816.91
8.0.110.0000.00816.96
8.0.100.0000.00716.80
8.0.90.0040.00416.79
8.0.80.0100.00716.94
8.0.70.0070.00016.72
8.0.60.0000.00716.94
8.0.50.0000.00716.86
8.0.30.0090.01017.04
8.0.20.0100.00917.40
8.0.10.0040.00416.94
8.0.00.0090.00916.94
7.4.330.0050.00015.09
7.4.320.0000.00716.63
7.4.300.0030.00316.61
7.4.290.0000.00816.55
7.4.280.0080.00016.65
7.4.270.0030.00316.48
7.4.260.0050.00216.50
7.4.250.0040.00416.43
7.4.240.0030.00316.63
7.4.230.0080.00016.28
7.4.220.0220.00416.65
7.4.210.0100.00716.71
7.4.200.0000.00716.53
7.4.160.0130.00616.53
7.4.150.0040.01517.40
7.4.140.0160.00417.86
7.4.130.0090.01116.45
7.4.120.0090.01216.40
7.4.110.0160.00316.71
7.4.100.0050.01116.69
7.4.90.0100.00716.70
7.4.80.0090.01219.39
7.4.70.0160.00016.67
7.4.60.0090.00616.46
7.4.50.0110.00816.64
7.4.40.0120.00816.59
7.4.30.0100.00716.54
7.4.00.0030.01314.73
7.3.330.0030.00313.39
7.3.320.0050.00013.39
7.3.310.0030.00316.14
7.3.300.0000.00616.18
7.3.290.0050.01116.33
7.3.280.0050.01016.38
7.3.270.0100.01417.40
7.3.260.0090.00916.41
7.3.250.0110.01116.45
7.3.240.0130.00316.46
7.3.230.0130.00416.43
7.3.210.0030.01316.60
7.3.200.0120.00919.39
7.3.190.0120.00416.54
7.3.180.0130.00316.57
7.3.170.0100.00716.34
7.3.160.0040.01916.51
7.3.00.0160.00716.53
7.2.330.0110.00916.65
7.2.320.0070.01016.84
7.2.310.0080.00816.52
7.2.300.0090.01016.58
7.2.290.0040.01316.58
7.2.130.0170.00717.13
7.2.120.0110.00616.72
7.2.110.0060.01016.94
7.2.100.0000.01017.04
7.2.90.0130.00316.63
7.2.80.0080.00716.74
7.2.70.0070.00716.80
7.2.60.0060.00616.87
7.2.50.0180.00417.00
7.2.40.0100.01016.97
7.2.30.0130.00616.73
7.2.20.0090.00616.93
7.2.10.0090.00316.70
7.2.00.0030.01316.94
7.1.250.0100.00715.78
7.1.240.0170.00315.76
7.1.230.0160.00615.72
7.1.220.0160.00315.88
7.1.210.0180.00415.56
7.1.200.0090.00515.86
7.1.190.0120.00615.89
7.1.180.0180.00315.88
7.1.170.0000.01515.59
7.1.160.0170.00315.82
7.1.150.0120.00615.85
7.1.140.0150.00615.88
7.1.130.0190.00015.75
7.1.120.0150.00915.86
7.1.110.0180.00415.57
7.1.100.0070.01116.94
7.1.90.0070.00715.86
7.1.80.0180.00316.00
7.1.70.0200.00316.44
7.1.60.0050.01417.58
7.1.50.0040.01115.88
7.1.40.0100.00716.00
7.1.30.0180.00415.80
7.1.20.0030.01015.53
7.1.10.0060.01215.76
7.1.00.0020.04519.19
7.0.330.0100.01015.38
7.0.320.0100.00015.40
7.0.310.0110.00315.35
7.0.300.0130.01015.32
7.0.290.0160.00315.63
7.0.280.0060.00915.46
7.0.270.0120.00615.54
7.0.260.0100.00615.43
7.0.250.0100.00715.27
7.0.240.0070.01015.25
7.0.230.0120.00615.45
7.0.220.0100.00315.59
7.0.210.0070.00415.56
7.0.200.0000.00916.16
7.0.190.0030.00615.68
7.0.180.0030.01015.44
7.0.170.0070.01115.40
7.0.160.0100.00715.55
7.0.150.0030.00715.65
7.0.140.0000.01115.55
7.0.130.0040.01115.59
7.0.120.0000.01215.55
7.0.110.0060.00615.48
7.0.100.0090.00915.18
7.0.90.0060.00615.19
7.0.80.0040.00715.65
7.0.70.0060.00915.54
7.0.60.0150.03717.78
7.0.50.0150.02718.00
7.0.40.0100.03516.96
7.0.30.0100.03317.05
7.0.20.0170.03016.93
7.0.10.0160.02516.90
7.0.00.0140.03416.89
5.6.380.0070.00714.43
5.6.370.0060.00614.13
5.6.360.0040.00714.38
5.6.350.0050.00314.06
5.6.340.0100.00314.57
5.6.330.0100.00714.41
5.6.320.0090.00614.60
5.6.310.0040.00813.97
5.6.300.0030.01014.60
5.6.290.0080.00314.20
5.6.280.0030.00914.38
5.6.270.0120.00014.18
5.6.260.0060.00614.40
5.6.250.0030.00714.53
5.6.240.0030.00614.32
5.6.230.0030.00614.59
5.6.220.0060.00614.13
5.6.210.0080.04017.66
5.6.200.0120.04717.53
5.6.190.0160.03017.74
5.6.180.0100.03417.62
5.6.170.0160.02817.68
5.6.160.0210.02717.70
5.6.150.0120.03117.76
5.6.140.0190.02617.82
5.6.130.0160.03217.81
5.6.120.0050.03617.73
5.6.110.0070.03517.70
5.6.100.0040.03717.69
5.6.90.0170.02717.75
5.6.80.0150.03017.46
5.6.70.0300.03717.47
5.6.60.0120.03017.45
5.6.50.0180.03017.47
5.6.40.0130.03317.34
5.6.30.0180.02617.35
5.6.20.0150.03317.38
5.6.10.0090.03117.39
5.6.00.0090.03917.58
5.5.380.0040.00711.48
5.5.370.0080.00011.20
5.5.360.0060.00611.52
5.5.350.0170.04115.92
5.5.340.0080.03816.16
5.5.330.0130.03116.03
5.5.320.0090.03616.01
5.5.310.0180.02516.03
5.5.300.0110.03016.02
5.5.290.0200.02716.09
5.5.280.0130.03016.08
5.5.270.0080.03116.10
5.5.260.0050.03716.08
5.5.250.0140.03215.89
5.5.240.0150.02815.64
5.5.230.0230.03015.72
5.5.220.0080.03015.63
5.5.210.0120.03015.72
5.5.200.0130.03715.71
5.5.190.0160.03115.70
5.5.180.0190.02815.66
5.5.170.0000.00611.18
5.5.160.0110.02915.75
5.5.150.0170.03115.67
5.5.140.0150.03115.78
5.5.130.0160.02915.78
5.5.120.0130.03515.82
5.5.110.0170.03115.70
5.5.100.0180.03015.65
5.5.90.0200.03315.67
5.5.80.0220.03715.67
5.5.70.0100.03715.73
5.5.60.0160.03215.64
5.5.50.0150.03515.59
5.5.40.0130.03015.68
5.5.30.0150.02815.66
5.5.20.0130.04015.63
5.5.10.0190.02615.60
5.5.00.0180.03215.65

preferences:
28.6 ms | 403 KiB | 5 Q