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) && !isset($result[$key]) ) { $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.120.0080.01224.00
8.4.110.0110.01120.44
8.4.100.0100.01118.96
8.4.90.0060.01420.61
8.4.80.0120.00818.83
8.4.70.0080.00718.88
8.4.60.0110.00918.82
8.4.50.0040.00518.61
8.4.40.0170.00319.31
8.4.30.0060.01320.66
8.4.20.0030.01618.66
8.4.10.0060.01320.55
8.3.250.0110.00719.02
8.3.240.0050.00517.22
8.3.230.0100.01116.75
8.3.220.0050.00419.11
8.3.210.0120.00716.60
8.3.200.0050.00416.68
8.3.190.0120.00617.04
8.3.180.0090.00618.54
8.3.170.0040.00416.34
8.3.160.0080.00016.57
8.3.150.0060.01316.48
8.3.140.0110.00416.45
8.3.130.0040.00418.41
8.3.120.0040.00418.82
8.3.110.0040.00420.94
8.3.100.0130.00324.06
8.3.90.0070.00426.77
8.3.80.0060.00316.75
8.3.70.0100.01018.45
8.3.60.0150.00018.31
8.3.50.0100.00718.24
8.3.40.0080.00818.89
8.3.30.0070.01118.89
8.3.20.0000.00724.18
8.3.10.0050.00224.66
8.3.00.0040.00426.16
8.2.290.0040.00420.55
8.2.280.0120.00718.41
8.2.270.0120.00617.25
8.2.260.0110.00717.02
8.2.250.0040.00416.84
8.2.240.0060.00317.04
8.2.230.0060.00322.58
8.2.220.0050.00337.54
8.2.210.0090.00926.77
8.2.200.0030.00716.75
8.2.190.0140.00416.88
8.2.180.0140.00325.92
8.2.170.0090.00619.07
8.2.160.0100.00722.96
8.2.150.0040.00425.66
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0040.00426.16
8.2.110.0070.00322.24
8.2.100.0040.00817.72
8.2.90.0090.00017.91
8.2.80.0000.00919.11
8.2.70.0030.00617.93
8.2.60.0070.00318.09
8.2.50.0060.00318.10
8.2.40.0040.00421.07
8.2.30.0050.00219.43
8.2.20.0070.00018.07
8.2.10.0000.00819.20
8.2.00.0030.00519.42
8.1.330.0080.01022.28
8.1.320.0110.01115.97
8.1.310.0030.00516.71
8.1.300.0090.00017.96
8.1.290.0030.00718.88
8.1.280.0140.00425.92
8.1.270.0030.00624.66
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0030.00622.03
8.1.230.0080.00320.97
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0050.00617.35
8.1.190.0040.00417.25
8.1.180.0000.00818.10
8.1.170.0050.00318.66
8.1.160.0050.00320.66
8.1.150.0000.00818.86
8.1.140.0000.00720.66
8.1.130.0030.00320.07
8.1.120.0040.00417.45
8.1.110.0030.00517.38
8.1.100.0030.00917.38
8.1.90.0040.00417.39
8.1.80.0090.00017.42
8.1.70.0090.00017.35
8.1.60.0040.00717.61
8.1.50.0050.00317.54
8.1.40.0070.00017.50
8.1.30.0000.00817.66
8.1.20.0060.00317.63
8.1.10.0030.00517.50
8.1.00.0000.00717.38
8.0.300.0000.00820.13
8.0.290.0040.00416.63
8.0.280.0050.00318.32
8.0.270.0000.00716.86
8.0.260.0030.00318.57
8.0.250.0070.00016.97
8.0.240.0030.00316.83
8.0.230.0040.00416.96
8.0.220.0070.00016.84
8.0.210.0030.00316.78
8.0.200.0000.00616.86
8.0.190.0040.00416.91
8.0.180.0000.00816.93
8.0.170.0030.00616.91
8.0.160.0040.00416.97
8.0.150.0040.00416.74
8.0.140.0040.00416.77
8.0.130.0060.00013.39
8.0.120.0040.00416.86
8.0.110.0000.00816.92
8.0.100.0000.00716.79
8.0.90.0040.00416.71
8.0.80.0070.01116.88
8.0.70.0040.00416.76
8.0.60.0000.00716.90
8.0.50.0000.00717.00
8.0.30.0140.01716.82
8.0.20.0190.01017.01
8.0.10.0140.01416.98
8.0.00.0240.00017.00
7.4.330.0000.00415.55
7.4.320.0030.00316.52
7.4.300.0070.00016.52
7.4.290.0000.00716.47
7.4.280.0050.00316.59
7.4.270.0030.00316.61
7.4.260.0030.00313.22
7.4.250.0000.00816.56
7.4.240.0050.00216.52
7.4.230.0000.00716.67
7.4.220.0000.00716.40
7.4.210.0110.00716.60
7.4.200.0000.00716.63
7.4.160.0200.01216.41
7.4.150.0190.00716.36
7.4.140.0180.00716.39
7.4.130.0110.01416.34
7.4.120.0180.00616.30
7.4.110.0250.00516.36
7.4.100.0180.01116.52
7.4.90.0140.01416.43
7.4.80.0180.01816.29
7.4.70.0130.01316.38
7.4.60.0330.00416.53
7.4.50.0150.01116.34
7.4.40.0170.01316.27
7.4.30.0190.00716.35
7.4.20.0290.00416.28
7.4.10.0220.01116.42
7.4.00.0190.00516.52
7.3.330.0040.00416.23
7.3.320.0000.00513.15
7.3.310.0030.00316.40
7.3.300.0030.00316.41
7.3.290.0110.00616.34
7.3.280.0200.00416.28
7.3.270.0250.00016.33
7.3.260.0230.00416.35
7.3.250.0230.00616.23
7.3.240.0150.01116.39
7.3.230.0220.00416.37
7.3.220.0200.00816.28
7.3.210.0150.01216.27
7.3.200.0210.00716.31
7.3.190.0230.00716.22
7.3.180.0150.01216.27
7.3.170.0230.00716.28
7.3.160.0280.00316.34
7.3.150.0100.01816.23
7.3.140.0270.00416.34
7.3.130.0190.00816.28
7.3.120.0200.00716.26
7.3.110.0180.01116.21
7.3.100.0080.01716.15
7.3.90.0150.01216.47
7.3.80.0190.00916.30
7.3.70.0210.00716.40
7.3.60.0200.00716.51
7.3.50.0240.00516.49
7.3.40.0290.00016.48
7.3.30.0120.01216.41
7.3.20.0180.01016.46
7.3.10.0250.00616.41
7.3.00.0190.01216.40

preferences:
28.2 ms | 403 KiB | 5 Q