3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = json_decode('{ "name": "", "type": "layout", "children": [ { "name": "", "type": "section", "children": [ { "name": "", "type": "row", "children": [ { "name": "", "type": "column", "props": { }, "children": [] }, { "type": "column", "children": [ { "type": "itemdata", "props": { "basevalue": "100" }, "children": [] } ] } ] } ] }]}',true); //print_r($arr); function getBaseValue($arr,$search_key){ $pending_calls = []; foreach($arr as $key => $value){ if(is_array($value)){ $pending_calls[] = $value; }else if($search_key === $key){ return $value; } } foreach($pending_calls as $call){ $returned_val = getBaseValue($call,$search_key); if($returned_val !== false) return $returned_val; } return false; } echo getBaseValue($arr,'basevalue');

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.0050.00620.77
8.4.110.0050.00524.36
8.4.100.0130.00717.78
8.4.90.0120.00918.77
8.4.80.0050.00319.52
8.4.70.0120.00717.89
8.4.60.0030.00522.22
8.4.50.0080.00220.51
8.4.40.0080.00017.71
8.4.30.0040.01520.30
8.4.20.0160.00317.75
8.4.10.0170.00319.61
8.3.250.0110.00918.92
8.3.240.0090.01016.83
8.3.230.0110.00816.66
8.3.220.0050.00418.88
8.3.210.0050.00318.38
8.3.200.0050.00416.79
8.3.190.0100.01019.04
8.3.180.0110.00716.57
8.3.170.0090.00916.87
8.3.160.0130.00720.15
8.3.150.0070.01117.05
8.3.140.0070.01117.41
8.3.130.0000.00918.56
8.3.120.0080.00818.79
8.3.110.0060.00320.94
8.3.100.0070.00716.61
8.3.90.0050.00326.77
8.3.80.0090.00016.48
8.3.70.0040.01118.30
8.3.60.0190.00016.63
8.3.50.0110.01023.51
8.3.40.0100.00718.54
8.3.30.0140.00018.73
8.3.20.0000.00820.73
8.3.10.0040.00420.41
8.3.00.0040.00420.90
8.2.290.0070.01220.47
8.2.280.0080.00922.28
8.2.270.0160.00317.17
8.2.260.0090.00618.86
8.2.250.0000.00816.61
8.2.240.0120.00616.93
8.2.230.0000.00922.58
8.2.220.0130.00724.06
8.2.210.0110.00726.77
8.2.200.0030.00616.63
8.2.190.0110.00416.63
8.2.180.0070.00718.41
8.2.170.0040.01122.96
8.2.160.0030.01220.39
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0100.00726.16
8.2.120.0040.00426.16
8.2.110.0060.00319.39
8.2.100.0070.00417.72
8.2.90.0030.00617.75
8.2.80.0050.00318.86
8.2.70.0040.00417.63
8.2.60.0000.00817.93
8.2.50.0000.01018.07
8.2.40.0000.00718.35
8.2.30.0040.00418.13
8.2.20.0000.00718.19
8.2.10.0040.00419.31
8.2.00.0040.00419.18
8.1.330.0040.00522.07
8.1.320.0130.00616.18
8.1.310.0090.00918.46
8.1.300.0110.00718.51
8.1.290.0060.00330.84
8.1.280.0070.01425.92
8.1.270.0040.00422.02
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00621.01
8.1.230.0080.00317.88
8.1.220.0040.00417.91
8.1.210.0030.00618.77
8.1.200.0000.01017.25
8.1.190.0090.00017.23
8.1.180.0040.00418.10
8.1.170.0050.00318.61
8.1.160.0050.00518.81
8.1.150.0050.00218.94
8.1.140.0000.00718.91
8.1.130.0000.00720.20
8.1.120.0000.00717.52
8.1.110.0030.00517.48
8.1.100.0000.00717.43
8.1.90.0040.00417.50
8.1.80.0050.00317.42
8.1.70.0000.00817.49
8.1.60.0080.00017.58
8.1.50.0040.00417.55
8.1.40.0040.00417.44
8.1.30.0040.00417.67
8.1.20.0000.00717.63
8.1.10.0000.00817.53
8.1.00.0100.00017.43
8.0.300.0030.00618.77
8.0.290.0060.00316.75
8.0.280.0030.00318.47
8.0.270.0030.00317.93
8.0.260.0030.00320.08
8.0.250.0060.00316.91
8.0.240.0030.00316.95
8.0.230.0000.00716.87
8.0.220.0070.00016.86
8.0.210.0040.00416.89
8.0.200.0000.00916.97
8.0.190.0000.00816.85
8.0.180.0000.00816.84
8.0.170.0040.00416.91
8.0.160.0000.00816.89
8.0.150.0000.00816.87
8.0.140.0070.00016.89
8.0.130.0030.00313.35
8.0.120.0000.00816.89
8.0.110.0030.00516.91
8.0.100.0000.00816.84
8.0.90.0000.00916.80
8.0.80.0000.01416.79
8.0.70.0000.00716.88
8.0.60.0070.00016.96
8.0.50.0000.00716.99
8.0.30.0130.00317.04
8.0.20.0080.01517.21
8.0.10.0000.00717.04
8.0.00.0060.01516.61
7.4.330.0000.00515.55
7.4.320.0030.00316.59
7.4.300.0000.00616.46
7.4.290.0050.00516.50
7.4.280.0000.00916.64
7.4.270.0040.00416.61
7.4.260.0030.00313.18
7.4.250.0040.00416.42
7.4.240.0020.00516.56
7.4.230.0000.00716.68
7.4.220.0010.00616.44
7.4.210.0050.01216.62
7.4.200.0040.00416.35
7.4.130.0140.00916.44
7.4.120.0030.01316.51
7.4.110.0060.01116.73
7.4.100.0230.00316.36
7.4.90.0130.00416.38
7.4.80.0090.00919.39
7.4.70.0090.00916.69
7.4.60.0060.01216.54
7.4.50.0020.00716.34
7.4.40.0090.00716.73
7.4.20.0090.00816.51
7.4.10.0080.00816.48
7.4.00.0190.00016.43
7.3.330.0000.00716.45
7.3.320.0060.00013.20
7.3.310.0070.00016.40
7.3.300.0030.00316.33
7.3.290.0070.00816.32
7.3.280.0100.01016.37
7.3.260.0070.01016.73
7.3.240.0110.00916.53
7.3.230.0150.00616.37
7.3.210.0080.01516.62
7.3.200.0070.01016.56
7.3.190.0070.01016.31
7.3.180.0100.01016.65
7.3.170.0030.01616.52
7.3.160.0060.01516.66
7.3.140.0030.01216.35
7.3.130.0030.01216.32
7.3.120.0060.00916.30
7.3.110.0080.00916.34
7.3.100.0030.01216.28
7.3.90.0080.00716.45
7.3.80.0060.01516.27
7.3.70.0050.01016.46
7.3.60.0060.00916.33
7.3.50.0070.00716.36
7.3.40.0060.00916.45
7.3.30.0060.00916.46
7.3.20.0050.01216.36
7.3.10.0110.00716.40
7.3.00.0100.00616.39
7.2.330.0120.01216.70
7.2.320.0130.00316.79
7.2.310.0050.01216.86
7.2.300.0160.00916.71
7.2.290.0090.00916.76
7.2.270.0060.01016.31
7.2.260.0130.00316.65
7.2.250.0100.00616.44
7.2.240.0090.01616.44
7.2.230.0100.00616.75
7.2.220.0060.00916.61
7.2.210.0100.00616.76
7.2.200.0060.01016.61
7.2.190.0000.01516.67
7.2.180.0070.01016.69
7.2.170.0160.00016.54
7.2.160.0090.00916.73
7.2.150.0130.00416.54
7.2.140.0070.01016.62
7.2.130.0070.01016.67
7.2.120.0140.00916.77
7.2.110.0210.00916.69
7.2.100.0070.01016.65
7.2.90.0030.02016.69
7.2.80.0110.01116.42
7.2.70.0120.01016.59
7.2.60.0030.01416.69
7.2.50.0120.00616.58
7.2.40.0130.00616.70
7.2.30.0120.00916.71
7.2.20.0030.01316.56
7.2.10.0100.01016.59
7.2.00.0070.01116.53

preferences:
127.19 ms | 403 KiB | 5 Q