3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'A', 'B', 'C', 'D' => [ 'E', 'F' => [ 'G', 'H' ] ], 'I' => [ 'J', 'K' ], 'L' ]; function categoryExist($arr, $category) : bool { $ce = false; foreach ($arr as $key => $value) { if ($category === $key) return true; if (is_array($value)) { if (categoryExist($value, $category)) return true; } else { if ($category === $value) return true; } } return false; } foreach (range('A', 'M') as $cat) echo "Category '$cat' " . (categoryExist($arr, $cat) ? '' : 'not ') . "found\n"; ?>

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.5.00.0140.00819.99
8.4.150.0010.00014.05
8.4.140.0130.00917.57
8.4.130.0110.00918.03
8.4.120.0110.00820.45
8.4.110.0090.01218.81
8.4.100.0110.01017.68
8.4.90.0150.00617.44
8.4.80.0120.00819.47
8.4.70.0100.01017.71
8.4.60.0150.00620.59
8.4.50.0150.00118.69
8.4.40.0100.00620.52
8.4.30.0150.00620.17
8.4.20.0160.00319.41
8.4.10.0050.00319.37
8.3.280.0020.00014.05
8.3.270.0100.00916.39
8.3.260.0120.00716.56
8.3.250.0050.01018.94
8.3.240.0100.00616.74
8.3.230.0130.00716.41
8.3.220.0060.00416.58
8.3.210.0090.00916.57
8.3.200.0130.00616.78
8.3.190.0100.00816.39
8.3.180.0120.00616.84
8.3.170.0070.01120.57
8.3.160.0140.00018.37
8.3.150.0160.00319.11
8.3.140.0120.00316.67
8.3.130.0030.00518.59
8.3.120.0040.00818.85
8.3.110.0060.00320.94
8.3.100.0080.00024.06
8.3.90.0070.01126.77
8.3.80.0040.00419.36
8.3.70.0170.00316.50
8.3.60.0240.00018.56
8.3.50.0080.00423.57
8.3.40.0120.00618.67
8.3.30.0070.00718.41
8.3.20.0060.00320.77
8.3.10.0040.00422.00
8.3.00.0080.00020.61
8.2.290.0070.00118.76
8.2.280.0020.00618.34
8.2.270.0060.00318.81
8.2.260.0040.00420.43
8.2.250.0040.00416.73
8.2.240.0150.00016.96
8.2.230.0000.00922.58
8.2.220.0040.00437.54
8.2.210.0040.00426.77
8.2.200.0060.00318.88
8.2.190.0110.01116.58
8.2.180.0110.00718.29
8.2.170.0040.01122.96
8.2.160.0110.00420.35
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0120.00620.62
8.2.110.0070.00321.11
8.2.100.0060.00617.72
8.2.90.0060.00317.78
8.2.80.0040.00419.02
8.2.70.0000.00817.63
8.2.60.0040.00417.63
8.2.50.0000.00918.05
8.2.40.0050.00317.63
8.2.30.0070.00017.79
8.2.20.0060.00318.14
8.2.10.0040.00419.20
8.2.00.0040.00420.96
8.1.330.0120.00716.18
8.1.320.0120.00916.18
8.1.310.0040.00418.01
8.1.300.0120.00419.52
8.1.290.0080.00330.84
8.1.280.0180.00325.92
8.1.270.0080.00020.61
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.14
8.1.230.0070.00420.79
8.1.220.0080.00017.77
8.1.210.0000.00818.97
8.1.200.0050.00317.68
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0030.00617.62
8.1.160.0080.00019.02
8.1.150.0040.00418.76
8.1.140.0000.00722.05
8.1.130.0050.00320.14
8.1.120.0070.00017.43
8.1.110.0000.00717.44
8.1.100.0000.00817.33
8.1.90.0040.00417.48
8.1.80.0060.00317.46
8.1.70.0040.00717.45
8.1.60.0040.00417.57
8.1.50.0000.00817.47
8.1.40.0000.00917.50
8.1.30.0080.00017.64
8.1.20.0000.00717.64
8.1.10.0000.00717.53
8.1.00.0060.00317.43
8.0.300.0070.00019.85
8.0.290.0000.00916.75
8.0.280.0060.00018.50
8.0.270.0000.00717.92
8.0.260.0030.00320.05
8.0.250.0070.00016.91
8.0.240.0000.00716.95
8.0.230.0050.00316.82
8.0.220.0030.00316.84
8.0.210.0070.00016.92
8.0.200.0040.00416.94
8.0.190.0000.00816.88
8.0.180.0040.00416.95
8.0.170.0030.00616.95
8.0.160.0070.00016.81
8.0.150.0000.00716.86
8.0.140.0040.00416.77
8.0.130.0050.00013.39
8.0.120.0000.00816.87
8.0.110.0040.00416.88
8.0.100.0000.00716.94
8.0.90.0090.00016.77
8.0.80.0070.00716.77
8.0.70.0050.00316.84
8.0.60.0040.00416.75
8.0.50.0040.00416.95
8.0.30.0060.01317.27
8.0.20.0040.01516.75
8.0.10.0040.00417.01
8.0.00.0060.01216.95
7.4.330.0050.00015.55
7.4.320.0000.00616.41
7.4.300.0000.00616.61
7.4.290.0030.00616.61
7.4.280.0080.00016.63
7.4.270.0000.00716.43
7.4.260.0000.00916.63
7.4.250.0030.00316.45
7.4.240.0030.00416.56
7.4.230.0030.00316.35
7.4.220.0020.00516.51
7.4.210.0080.00916.59
7.4.200.0050.00216.62
7.4.130.0070.01016.43
7.4.120.0180.00616.54
7.4.110.0100.00716.45
7.4.100.0070.01016.55
7.4.90.0120.00616.61
7.4.80.0030.01319.39
7.4.70.0110.00516.61
7.4.60.0120.00416.31
7.4.50.0000.01116.54
7.4.40.0130.00716.57
7.4.10.0000.01914.80
7.4.00.0080.00914.75
7.3.330.0040.00416.39
7.3.320.0000.00513.14
7.3.310.0030.00316.41
7.3.300.0000.00716.32
7.3.290.0080.01116.39
7.3.280.0100.01016.32
7.3.260.0090.00916.27
7.3.240.0110.00716.45
7.3.230.0140.00416.53
7.3.210.0030.01316.36
7.3.200.0120.00616.45
7.3.190.0030.01316.44
7.3.180.0100.00616.58
7.3.170.0090.01016.58
7.3.160.0110.00516.56
7.3.130.0060.00615.01
7.3.120.0060.01214.70
7.3.110.0100.00914.69
7.3.100.0110.00714.92
7.3.90.0100.00914.74
7.3.80.0110.00814.86
7.3.70.0080.00914.72
7.3.60.0110.00714.69
7.3.50.0110.00614.60
7.3.40.0070.00914.58
7.3.30.0070.00914.63
7.3.20.0110.00715.41
7.3.10.0120.00815.29
7.3.00.0130.00415.36
7.2.330.0130.00716.74
7.2.320.0110.00616.45
7.2.310.0130.00316.95
7.2.300.0090.01316.63
7.2.290.0080.01216.74
7.2.260.0040.01615.14
7.2.250.0100.00715.04
7.2.240.0120.00614.91
7.2.230.0090.01115.02
7.2.220.0110.00815.03
7.2.210.0080.00815.06
7.2.200.0140.00714.87
7.2.190.0130.00515.04
7.2.180.0120.00315.11
7.2.170.0060.01315.01
7.2.160.0120.00315.06
7.2.150.0150.00615.93
7.2.140.0100.00716.10
7.2.130.0130.00915.86
7.2.120.0130.00815.95
7.2.110.0090.00915.97
7.2.100.0090.01115.96
7.2.90.0090.01015.72
7.2.80.0090.00816.02
7.2.70.0080.00915.90
7.2.60.0070.00916.03
7.2.50.0140.00515.97
7.2.40.0110.00715.85
7.2.30.0090.01016.00
7.2.20.0130.00715.91
7.2.10.0200.00515.72
7.2.00.0080.00515.90
7.1.330.0140.00513.99
7.1.320.0110.01114.08
7.1.310.0070.01013.99
7.1.300.0070.01113.68
7.1.290.0290.00413.87
7.1.280.0130.00813.96
7.1.270.0110.00913.71
7.1.260.0140.00713.90
7.1.250.0470.00613.88
7.1.240.0170.00713.96
7.1.230.0160.00313.77
7.1.220.0180.00613.96
7.1.210.0150.00414.00
7.1.200.0140.01413.64
7.1.190.0140.00813.84
7.1.180.0090.00913.87
7.1.170.0200.00013.79
7.1.160.0110.00813.87
7.1.150.0090.01513.96
7.1.140.0130.01814.15
7.1.130.0090.00914.08
7.1.120.0130.01314.19
7.1.110.0120.00613.80
7.1.100.0140.00514.07
7.1.90.0170.00714.02
7.1.80.0300.01014.00
7.1.70.0130.00713.71
7.1.60.0110.00814.11
7.1.50.0140.00714.07
7.1.40.0120.00913.92
7.1.30.0190.00013.98
7.1.20.0190.00013.95
7.1.10.0050.01113.97
7.1.00.0110.00914.04
7.0.330.0140.00713.63
7.0.320.0160.00513.55
7.0.310.0110.01113.55
7.0.300.0130.00613.55
7.0.290.0120.01813.39
7.0.280.0130.00413.21
7.0.270.0090.00913.37
7.0.260.0160.00313.29
7.0.250.0140.00413.51
7.0.240.0140.00813.74
7.0.230.0160.00413.69
7.0.220.0090.00913.38
7.0.210.0140.00513.53
7.0.200.0130.00913.49
7.0.190.0180.00313.71
7.0.180.0150.00913.39
7.0.170.0170.00713.68
7.0.160.0060.01213.46
7.0.150.0110.00813.68
7.0.140.0110.01113.52
7.0.130.0200.00013.49
7.0.120.0090.01013.50
7.0.110.0130.00913.52
7.0.100.0150.00313.60
7.0.90.0220.00213.50
7.0.80.0060.01313.59
7.0.70.0120.01413.51
7.0.60.0110.00813.32
7.0.50.0130.01013.40
7.0.40.0170.00713.61
7.0.30.0180.00413.60
7.0.20.0240.00013.66
7.0.10.0220.00313.43
7.0.00.0200.00313.79
5.6.400.0160.00813.86
5.6.390.0160.01214.12
5.6.380.0150.01214.23
5.6.370.0150.00514.13
5.6.360.0180.00514.00
5.6.350.0110.01414.11
5.6.340.0080.01113.51
5.6.330.0120.00813.81
5.6.320.0140.00513.93
5.6.310.0140.01013.87
5.6.300.0170.00514.27
5.6.290.0090.00914.16
5.6.280.0170.00614.32
5.6.270.0070.01414.17
5.6.260.0150.00314.15
5.6.250.0080.01113.98
5.6.240.0200.00014.06
5.6.230.0130.00813.89
5.6.220.0100.01014.07
5.6.210.0140.00514.02
5.6.200.0170.00413.90
5.6.190.0190.00314.19
5.6.180.0170.00614.21
5.6.170.0070.01713.75
5.6.160.0100.01714.11
5.6.150.0170.00913.99
5.6.140.0350.00313.78
5.6.130.0100.01014.07
5.6.120.0130.00814.02
5.6.110.0140.00713.92
5.6.100.0120.00813.79
5.6.90.0110.00813.89
5.6.80.0130.00513.81
5.6.70.0090.00913.98
5.6.60.0120.01214.04
5.6.50.0150.00313.60
5.6.40.0130.00313.88
5.6.30.0060.00914.00
5.6.20.0140.00514.02
5.6.10.0190.00513.99
5.6.00.0100.01013.94
5.5.380.0160.00513.99
5.5.370.0150.00413.91
5.5.360.0160.00313.71
5.5.350.0240.00714.32
5.5.340.0210.00613.89
5.5.330.0190.00413.83
5.5.320.0090.01214.06
5.5.310.0190.00814.16
5.5.300.0140.00613.95
5.5.290.0220.00314.22
5.5.280.0120.01213.76
5.5.270.0150.00513.95
5.5.260.0170.01113.78
5.5.250.0140.00714.02
5.5.240.0160.00713.84
5.5.230.0120.01213.69
5.5.220.0150.00814.04
5.5.210.0110.01114.03
5.5.200.0090.00913.73
5.5.190.0190.00013.71
5.5.180.0140.00313.90
5.5.170.0090.00813.86
5.5.160.0130.00313.79
5.5.150.0070.01113.89
5.5.140.0070.01114.07
5.5.130.0080.00813.52
5.5.120.0140.00614.05
5.5.110.0090.01313.85
5.5.100.0140.01013.84
5.5.90.0080.01213.74
5.5.80.0050.01313.76
5.5.70.0140.00713.84
5.5.60.0150.00413.68
5.5.50.0150.00613.72
5.5.40.0070.01213.64
5.5.30.0090.00914.03
5.5.20.0140.00513.50
5.5.10.0110.00913.77
5.5.00.0170.00213.73
5.4.450.0110.00812.70
5.4.440.0140.00412.70
5.4.430.0080.00812.70
5.4.420.0100.00612.70
5.4.410.0100.00512.70
5.4.400.0100.00512.70
5.4.390.0100.00712.70
5.4.380.0080.01212.70
5.4.370.0140.00212.70
5.4.360.0080.00412.70
5.4.350.0000.01512.70
5.4.340.0070.00712.70
5.4.330.0000.01312.70
5.4.320.0000.01012.70
5.4.310.0070.00712.70
5.4.300.0060.00612.70
5.4.290.0110.00312.70
5.4.280.0080.00812.70
5.4.270.0120.00712.70
5.4.260.0140.00012.70
5.4.250.0100.00712.70
5.4.240.0070.00712.70
5.4.230.0050.01112.70
5.4.220.0120.00312.70
5.4.210.0100.00512.70
5.4.200.0110.00512.70
5.4.190.0100.00512.70
5.4.180.0080.00612.70
5.4.170.0130.00312.70
5.4.160.0040.01112.70
5.4.150.0070.00712.70
5.4.140.0100.00512.70
5.4.130.0100.00512.70
5.4.120.0030.01312.70
5.4.110.0080.00812.70
5.4.100.0110.00312.70
5.4.90.0140.00012.70
5.4.80.0090.00412.70
5.4.70.0150.00812.70
5.4.60.0100.00412.70
5.4.50.0000.01512.70
5.4.40.0140.00312.70
5.4.30.0120.00512.70
5.4.20.0070.00712.70
5.4.10.0100.00512.70
5.4.00.0080.00512.70
5.3.290.0080.00412.70
5.3.280.0080.00312.70
5.3.270.0000.01312.70
5.3.260.0140.00012.70
5.3.250.0060.00612.70
5.3.240.0060.00912.70
5.3.230.0070.00712.70
5.3.220.0060.00712.70
5.3.210.0070.00712.70
5.3.200.0080.00512.70
5.3.190.0060.00712.70
5.3.180.0090.00312.70
5.3.170.0090.00412.70
5.3.160.0060.00712.70
5.3.150.0090.00412.70
5.3.140.0040.01112.70
5.3.130.0140.00012.70
5.3.120.0080.00412.70
5.3.110.0130.00012.70
5.3.100.0000.01212.70
5.3.90.0040.00912.70
5.3.80.0130.00012.70
5.3.70.0070.00412.70
5.3.60.0040.00712.70
5.3.50.0070.00412.70
5.3.40.0070.00612.70
5.3.30.0080.00412.70
5.3.20.0060.01112.70
5.3.10.0080.00812.70
5.3.00.0120.00212.70
5.2.170.0080.00812.70
5.2.160.0100.00312.70
5.2.150.0090.00312.70
5.2.140.0000.01012.70
5.2.130.0080.00512.70
5.2.120.0070.00412.70
5.2.110.0090.00312.70
5.2.100.0080.00212.70
5.2.90.0080.00412.70
5.2.80.0070.00512.70
5.2.70.0040.00712.70
5.2.60.0030.00912.70
5.2.50.0020.01112.70
5.2.40.0100.00212.70
5.2.30.0100.00012.70
5.2.20.0000.01012.70
5.2.10.0040.01012.70
5.2.00.0110.00012.70
5.1.60.0090.00512.70
5.1.50.0090.00412.70
5.1.40.0070.00312.70
5.1.30.0070.00312.70
5.1.20.0050.00612.70
5.1.10.0090.00012.70
5.1.00.0090.00012.70
5.0.50.0060.00312.70
5.0.40.0040.00412.70
5.0.30.0080.00012.70
5.0.20.0040.00412.70
5.0.10.0000.00812.70
5.0.00.0070.00012.70
4.4.90.0030.00312.70
4.4.80.0060.00012.70
4.4.70.0080.00012.70
4.4.60.0040.00412.70
4.4.50.0080.00212.70
4.4.40.0030.00312.70
4.4.30.0060.00012.70
4.4.20.0030.00312.70
4.4.10.0030.00512.70
4.4.00.0000.00712.70
4.3.110.0040.00412.70
4.3.100.0060.00012.70
4.3.90.0040.00412.70
4.3.80.0070.00012.70
4.3.70.0050.00212.70
4.3.60.0060.00312.70
4.3.50.0000.00912.70
4.3.40.0000.00812.70
4.3.30.0070.00012.70
4.3.20.0030.00312.70
4.3.10.0020.00512.70
4.3.00.0050.00012.70

preferences:
37.85 ms | 403 KiB | 5 Q