3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'vehicle info' => [ 'one' => [ 'submodel' => 'LX', 'engine' => 2.3 ], 'two' => [ 'color' => 'blue', 'year' => 2007, 'wheels' => 4 ], 'three' => [ 'submodel' => 'LX', 'make' => 'Ford', 'model' => 'F-150', 'offroad' => 'No' ] ] ]; $needles = ['submodel', 'offroad']; $result = []; array_walk_recursive( $array, function($value, $key) use ($needles, &$result) { if ( in_array($key, $needles) && !key_exists($key, $result) ) { $result[$key] = "$key is $value"; } } ); var_export($result);

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.0110.01017.68
8.4.130.0060.00317.68
8.4.120.0130.00520.82
8.4.110.0100.01022.20
8.4.100.0100.00822.63
8.4.90.0110.00918.88
8.4.80.0130.00619.54
8.4.70.0140.00617.95
8.4.60.0080.01219.11
8.4.50.0070.00919.60
8.4.40.0060.01317.67
8.4.30.0130.00620.70
8.4.20.0170.00317.88
8.4.10.0030.01322.09
8.3.270.0120.00816.55
8.3.260.0090.01016.40
8.3.250.0110.00818.91
8.3.240.0130.00716.79
8.3.230.0130.00716.58
8.3.220.0140.00417.04
8.3.210.0120.00618.34
8.3.200.0060.00216.59
8.3.190.0100.00916.57
8.3.180.0090.00916.84
8.3.170.0070.01117.02
8.3.160.0060.01318.48
8.3.150.0120.00618.79
8.3.140.0140.00418.84
8.3.130.0000.00818.40
8.3.120.0030.00620.77
8.3.110.0060.00320.94
8.3.100.0050.00524.06
8.3.90.0060.01026.77
8.3.80.0090.00017.97
8.3.70.0040.01118.31
8.3.60.0140.00716.50
8.3.50.0180.00418.25
8.3.40.0090.00621.86
8.3.30.0110.00718.95
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0110.00727.70
8.2.290.0090.00920.22
8.2.280.0090.00620.62
8.2.270.0160.00317.25
8.2.260.0030.00616.64
8.2.250.0040.00416.81
8.2.240.0060.00317.53
8.2.230.0080.00022.58
8.2.220.0070.00337.54
8.2.210.0030.00626.77
8.2.200.0030.00616.38
8.2.190.0090.00616.75
8.2.180.0110.00718.16
8.2.170.0070.00718.95
8.2.160.0130.00722.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00722.25
8.2.110.0000.00920.98
8.2.100.0090.00317.72
8.2.90.0280.00317.38
8.2.80.0240.00717.48
8.2.70.0230.00717.50
8.2.60.0290.00417.50
8.2.50.0270.00417.38
8.2.40.0290.00017.25
8.2.30.0250.00917.38
8.2.20.0210.00517.63
8.2.10.0240.00317.63
8.2.00.0160.01317.25
8.1.330.0110.00822.17
8.1.320.0120.00816.23
8.1.310.0070.01116.88
8.1.300.0060.00317.98
8.1.290.0090.00030.84
8.1.280.0060.01325.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.57
8.1.230.0040.00820.89
8.1.220.0240.00317.50
8.1.210.0240.00517.48
8.1.200.0240.00817.13
8.1.190.0150.01616.98
8.1.180.0260.00417.00
8.1.170.0240.00617.13
8.1.160.0270.00417.13
8.1.150.0270.00017.11
8.1.140.0240.00417.25
8.1.130.0200.00717.10
8.1.120.0220.00617.34
8.1.110.0190.00917.11
8.1.100.0150.01217.38
8.1.90.0230.00317.25
8.1.80.0180.00917.38
8.1.70.0210.00417.35
8.1.60.0240.00417.23
8.1.50.0250.00417.23
8.1.40.0190.00817.50
8.1.30.0270.00017.53
8.1.20.0260.00417.47
8.1.10.0180.00817.25
8.1.00.0180.01317.23
8.0.300.0220.00616.80
8.0.290.0240.00616.80
8.0.280.0180.00916.80
8.0.270.0250.00416.80
8.0.260.0270.00316.80
8.0.250.0270.00416.80
8.0.240.0260.00516.80
8.0.230.0260.00216.80
8.0.220.0220.00716.80
8.0.210.0240.00516.80
8.0.200.0200.00816.80
8.0.190.0220.00616.80
8.0.180.0270.00216.80
8.0.170.0280.00216.80
8.0.160.0330.00016.80
8.0.150.0280.00016.80
8.0.140.0240.00316.80
8.0.130.0230.00516.80
8.0.120.0270.00016.80
8.0.110.0250.00016.82
8.0.100.0280.00016.80
8.0.90.0240.00316.80
8.0.80.0130.01318.08
8.0.70.0190.00916.80
8.0.60.0280.00016.80
8.0.50.0170.01016.80
8.0.30.0270.00016.80
8.0.20.0240.00316.88
8.0.10.0180.00716.80
7.4.330.0180.00716.19

preferences:
73.02 ms | 403 KiB | 5 Q