3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ '1' => true, ['2' => false, '4' => true], '3' => true ]; $matches = []; array_walk_recursive($array, function ($value, $key) use (&$matches) { if ($value === true) { $matches[] = $key; } }); print_r($matches);

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.130.0130.00617.70
8.4.120.0110.00820.47
8.4.110.0120.00718.60
8.4.100.0100.00917.64
8.4.90.0090.01218.81
8.4.80.0060.00319.81
8.4.70.0150.00418.22
8.4.60.0100.00920.50
8.4.50.0120.00817.71
8.4.40.0000.00817.49
8.4.30.0170.00318.75
8.4.20.0160.00319.74
8.4.10.0120.00917.61
8.3.260.0140.00316.80
8.3.250.0140.00518.88
8.3.240.0120.00616.48
8.3.230.0100.00816.59
8.3.220.0060.00217.32
8.3.210.0050.00318.43
8.3.200.0060.00216.77
8.3.190.0170.00616.82
8.3.180.0110.00816.34
8.3.170.0040.01416.42
8.3.160.0110.00720.10
8.3.150.0180.00016.61
8.3.140.0050.00317.38
8.3.130.0080.00018.59
8.3.120.0120.00618.86
8.3.110.0030.00620.94
8.3.100.0030.00716.35
8.3.90.0050.00326.77
8.3.80.0090.00018.50
8.3.70.0090.00616.75
8.3.60.0060.00918.30
8.3.50.0080.00624.53
8.3.40.0070.00722.16
8.3.30.0090.00618.54
8.3.20.0040.00420.80
8.3.10.0040.00420.16
8.3.00.0040.00422.38
8.2.290.0090.00920.38
8.2.280.0050.00318.31
8.2.270.0110.00717.16
8.2.260.0140.00418.32
8.2.250.0150.00018.52
8.2.240.0060.00318.72
8.2.230.0080.00022.58
8.2.220.0090.00024.06
8.2.210.0070.00726.77
8.2.200.0090.00016.63
8.2.190.0040.01216.58
8.2.180.0120.00318.31
8.2.170.0090.00618.83
8.2.160.0100.01022.96
8.2.150.0000.00824.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0060.00322.18
8.2.100.0090.00318.09
8.2.90.0040.00417.63
8.2.80.0050.00318.86
8.2.70.0040.00417.50
8.2.60.0000.00817.75
8.2.50.0030.00618.05
8.2.40.0080.00018.34
8.2.30.0040.00419.44
8.2.20.0070.00018.23
8.2.10.0070.00019.30
8.2.00.0000.01119.37
8.1.330.0110.00721.79
8.1.320.0090.01116.25
8.1.310.0040.01118.38
8.1.300.0040.01219.61
8.1.290.0030.01018.88
8.1.280.0160.00325.92
8.1.270.0080.00020.82
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0030.00524.02
8.1.230.0090.00317.89
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0090.00017.36
8.1.190.0050.00317.35
8.1.180.0030.00618.10
8.1.170.0000.00817.62
8.1.160.0040.00418.91
8.1.150.0000.00818.85
8.1.140.0050.00218.88
8.1.130.0030.00320.04
8.1.120.0040.00417.39
8.1.110.0030.00517.46
8.1.100.0040.00417.50
8.1.90.0040.00417.45
8.1.80.0000.00717.30
8.1.70.0030.00317.33
8.1.60.0000.00817.64
8.1.50.0000.00917.52
8.1.40.0000.00917.40
8.1.30.0050.00317.70
8.1.20.0050.00317.66
8.1.10.0040.00717.44
8.1.00.0040.00417.42
8.0.300.0070.00018.84
8.0.290.0060.00316.75
8.0.280.0040.00418.44
8.0.270.0000.00718.00
8.0.260.0030.00320.05
8.0.250.0000.00716.84
8.0.240.0000.00716.91
8.0.230.0000.00716.82
8.0.220.0070.00016.89
8.0.210.0030.00316.84
8.0.200.0000.00716.95
8.0.190.0030.00616.92
8.0.180.0000.00716.94
8.0.170.0070.00316.91
8.0.160.0070.00016.84
8.0.150.0030.00316.79
8.0.140.0040.00416.86
8.0.130.0000.00513.29
8.0.120.0080.00016.73
8.0.110.0020.00516.89
8.0.100.0080.00016.77
8.0.90.0030.00616.71
8.0.80.0060.00816.84
8.0.70.0040.00416.83
8.0.60.0040.00416.70
8.0.50.0070.00016.95
8.0.30.0100.00716.75
8.0.20.0110.01017.00
8.0.10.0000.00817.03
8.0.00.0120.00816.90
7.4.330.0000.00515.55
7.4.320.0060.00016.53
7.4.300.0070.00016.47
7.4.290.0070.00016.48
7.4.280.0020.00516.57
7.4.270.0030.00316.55
7.4.260.0030.00313.30
7.4.250.0050.00316.44
7.4.240.0000.00716.55
7.4.230.0000.00716.57
7.4.220.0030.00316.49
7.4.210.0090.00816.65
7.4.200.0000.00716.60
7.4.130.0060.01416.56
7.4.120.0160.00316.46
7.4.110.0000.01616.55
7.4.100.0140.01016.57
7.4.90.0110.00816.38
7.4.80.0070.01619.39
7.4.70.0100.01316.48
7.4.60.0130.00716.43
7.4.50.0030.01216.52
7.4.40.0100.00616.27
7.4.30.0150.01016.54
7.4.20.0120.00916.50
7.4.10.0160.01216.50
7.4.00.0090.00616.67
7.3.330.0040.00416.38
7.3.320.0050.00013.22
7.3.310.0000.00716.31
7.3.300.0030.00316.40
7.3.290.0090.00816.32
7.3.280.0040.01516.16
7.3.260.0090.00916.52
7.3.240.0090.01016.54
7.3.230.0030.01916.60
7.3.210.0110.00716.41
7.3.200.0130.00316.58
7.3.190.0140.00716.24
7.3.180.0160.00616.27
7.3.170.0100.00716.41
7.3.160.0090.00916.67
7.3.150.0090.01616.13
7.3.140.0130.00916.22
7.3.130.0130.00716.16
7.3.120.0150.00316.34
7.3.110.0180.01116.62
7.3.100.0130.01016.25
7.3.90.0130.00816.32
7.3.80.0100.01016.45
7.3.70.0200.00716.46
7.3.60.0180.00416.04
7.3.50.0090.01516.22
7.3.40.0120.00916.18
7.3.30.0150.00616.46
7.3.20.0190.00616.27
7.3.10.0150.01416.43
7.3.00.0220.00516.48
7.2.330.0150.00316.76
7.2.320.0090.00916.67
7.2.310.0000.01616.71
7.2.300.0030.02216.55
7.2.290.0130.00716.57
7.2.280.0080.01216.27
7.2.270.0110.01416.59
7.2.260.0140.00816.50
7.2.250.0180.00616.63
7.2.240.0090.01416.35
7.2.230.0140.00716.34
7.2.220.0170.00416.64
7.2.210.0170.01016.51
7.2.200.0180.01116.51
7.2.190.0170.00816.52
7.2.180.0170.01016.64
7.2.170.0140.01116.54
7.2.160.0140.01416.69
7.2.150.0160.01616.38
7.2.140.0240.00516.49
7.2.130.0180.01216.59
7.2.120.0140.01416.39
7.2.110.0180.00916.62
7.2.100.0180.00916.47
7.2.90.0130.01616.46
7.2.80.0260.00516.55
7.2.70.0240.00916.46
7.2.60.0340.01616.30
7.2.50.0160.01316.40
7.2.40.0110.01616.51
7.2.30.0210.01016.63
7.2.20.0220.00416.56
7.2.10.0070.01916.41
7.2.00.0130.00816.52

preferences:
150.8 ms | 403 KiB | 5 Q