3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array("title" => 1, "children" => array( array( "selected" => true, "key" => 12345, "children" => array() ) ) ) ); $selectedValues = array(); $iterator = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($array)); foreach ($iterator as $key => $value) { if ($key == "selected") { echo $value . PHP_EOL; } }

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.3.60.0150.00316.50
8.3.50.0150.00321.03
8.3.40.0140.00418.51
8.3.30.0090.01218.38
8.3.20.0000.00720.32
8.3.10.0100.01023.64
8.3.00.0040.00422.58
8.2.180.0180.00016.50
8.2.170.0110.00422.96
8.2.160.0110.00720.38
8.2.150.0120.00624.18
8.2.140.0000.00724.66
8.2.130.0110.00326.16
8.2.120.0060.00317.63
8.2.110.0070.00319.25
8.2.100.0080.00317.50
8.2.90.0000.00819.23
8.2.80.0000.00817.97
8.2.70.0000.00817.48
8.2.60.0050.00318.04
8.2.50.0040.00418.07
8.2.40.0040.00421.04
8.2.30.0040.00419.90
8.2.20.0050.00217.78
8.2.10.0030.00517.99
8.2.00.0000.00818.10
8.1.280.0070.01325.92
8.1.270.0060.00320.20
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0090.00023.80
8.1.230.0000.01117.48
8.1.220.0070.00017.74
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0030.00517.13
8.1.180.0020.00518.10
8.1.170.0050.00318.37
8.1.160.0000.00721.92
8.1.150.0040.00418.86
8.1.140.0040.00417.32
8.1.130.0000.00717.66
8.1.120.0040.00417.45
8.1.110.0000.00817.41
8.1.100.0030.00317.45
8.1.90.0000.00717.39
8.1.80.0070.00017.46
8.1.70.0030.00317.43
8.1.60.0080.00017.59
8.1.50.0030.00617.38
8.1.40.0040.00417.50
8.1.30.0040.00417.46
8.1.20.0020.00517.56
8.1.10.0050.00217.67
8.1.00.0070.00017.49
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0040.00418.37
8.0.270.0000.00717.27
8.0.260.0030.00317.23
8.0.250.0040.00416.99
8.0.240.0040.00416.97
8.0.230.0030.00516.95
8.0.220.0030.00316.87
8.0.210.0000.00816.92
8.0.200.0000.00616.81
8.0.190.0050.00316.96
8.0.180.0080.00016.83
8.0.170.0000.00816.93
8.0.160.0040.00416.80
8.0.150.0080.00016.81
8.0.140.0000.00716.88
8.0.130.0060.00013.39
8.0.120.0060.00316.86
8.0.110.0040.00416.92
8.0.100.0040.00416.93
8.0.90.0040.00416.80
8.0.80.0030.01316.86
8.0.70.0070.00016.94
8.0.60.0070.00016.88
8.0.50.0040.00416.88
8.0.30.0120.00617.20
8.0.20.0090.00917.40
8.0.10.0000.00716.84
8.0.00.0090.01016.64
7.4.330.0050.00015.10
7.4.320.0060.00016.62
7.4.300.0040.00416.41
7.4.290.0030.00316.53
7.4.280.0030.00316.61
7.4.270.0050.00216.60
7.4.260.0040.00416.53
7.4.250.0040.00416.52
7.4.240.0050.00216.56
7.4.230.0070.00016.72
7.4.220.0140.01116.59
7.4.210.0090.01216.54
7.4.200.0070.00016.44
7.4.160.0130.00316.64
7.4.150.0110.00717.40
7.4.140.0120.00817.86
7.4.130.0090.00916.53
7.4.120.0090.01316.53
7.4.110.0090.00916.54
7.4.100.0180.00016.34
7.4.90.0120.00616.56
7.4.80.0180.00719.39
7.4.70.0140.00916.68
7.4.60.0040.01116.45
7.4.50.0000.00716.43
7.4.40.0030.01316.61
7.4.30.0150.00916.52
7.4.00.0090.00614.94
7.3.330.0000.00813.03
7.3.320.0050.00013.00
7.3.310.0000.00816.27
7.3.300.0070.00016.32
7.3.290.0040.01116.25
7.3.280.0060.01116.24
7.3.270.0060.01217.40
7.3.260.0130.00416.33
7.3.250.0130.00916.24
7.3.240.0070.01016.38
7.3.230.0100.00716.46
7.3.210.0060.01216.21
7.3.200.0130.00319.39
7.3.190.0040.01216.54
7.3.180.0040.01416.60
7.3.170.0100.01016.57
7.3.160.0090.00916.53
7.2.330.0190.00516.41
7.2.320.0100.01016.52
7.2.310.0130.00316.74
7.2.300.0130.00316.58
7.2.290.0120.00616.67
7.2.00.0040.00819.54
7.1.100.0000.01218.11
7.1.70.0000.00717.24
7.1.60.0120.01220.03
7.1.50.0030.00916.89
7.1.00.0030.07322.43
7.0.200.0090.00616.73
7.0.60.0100.07719.77
7.0.50.0030.04717.81
7.0.40.0030.04320.30
7.0.30.0270.06020.18
7.0.20.0270.06020.11
7.0.10.0070.07320.20
7.0.00.0030.08320.01
5.6.280.0100.05020.78
5.6.210.0070.08720.63
5.6.200.0070.06018.09
5.6.190.0170.04320.63
5.6.180.0300.06020.60
5.6.170.0100.05020.42
5.6.160.0000.05320.33
5.6.150.0000.05318.22
5.6.140.0200.06718.14
5.6.130.0030.09318.11
5.6.120.0070.06321.04
5.6.110.0000.04321.01
5.6.100.0030.08021.02
5.6.90.0170.07720.94
5.6.80.0130.07320.41
5.6.70.2800.03020.43
5.5.350.0200.04020.48
5.5.340.0170.05018.02
5.5.330.0100.08720.15
5.5.320.0330.06720.30
5.5.310.0170.07020.18
5.5.300.0070.06018.01
5.5.290.0070.05717.86
5.5.280.0130.08020.76
5.5.270.0130.08020.97
5.5.260.0170.07320.88
5.5.250.0270.05020.71
5.5.240.0270.07320.24
5.4.450.0870.07719.58
5.4.440.0800.07019.41
5.4.430.0800.06019.45
5.4.420.0800.05319.57
5.4.410.0770.05319.16
5.4.400.0870.05019.29
5.4.390.0770.05319.08
5.4.380.0700.05719.22
5.4.370.0830.04319.31
5.4.360.0770.05319.28
5.4.350.0830.05019.14
5.4.340.0830.05319.28
5.4.320.0830.06018.95
5.4.310.0870.04319.16
5.4.300.0700.05719.31
5.4.290.0670.05019.31
5.4.280.0730.05718.77
5.4.270.0630.06319.29
5.4.260.0730.04319.29
5.4.250.0570.06319.28
5.4.240.0730.05018.99
5.4.230.0670.05319.00
5.4.220.0600.06019.14
5.4.210.0630.05718.89
5.4.200.0700.04316.65
5.4.190.0630.05319.04
5.4.180.0670.05318.85
5.4.170.0770.04018.94
5.4.160.0700.04719.07
5.4.150.0670.05318.92
5.4.140.0670.05016.36
5.4.130.0600.05316.15
5.4.120.0600.05016.43
5.4.110.0630.05016.47
5.4.100.0730.05316.19
5.4.90.0830.04716.57
5.4.80.0600.05716.20
5.4.70.0730.06016.31
5.4.60.0030.06016.28
5.4.50.0000.03316.04
5.4.40.0230.05016.38
5.4.30.0130.03716.38
5.4.20.0270.05016.36

preferences:
53.17 ms | 401 KiB | 5 Q