3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = [ 'a' => 'value a', 'b' => [ 1 => [], 2 => 'value b2', 3 => [ 'x' => 'value x', 'y' => [ 'value z', '' ] ], 'c' => '' ], 'c' => '' ]; function findEmpties($input, $currentLevel = null) { static $empties = []; foreach ($input as $key => $value) { $levelItem = $currentLevel ? "{$currentLevel}[{$key}]" : $key; if (empty($value)) { $empties['empty'][] = $levelItem; } else { if (is_array($value)) { findEmpties($value, $levelItem); } } } return $empties; } print_r(findEmpties($input));

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.10.0100.00620.23
8.5.00.0090.01220.10
8.4.150.0030.00014.05
8.4.140.0150.00617.37
8.4.130.0100.00917.56
8.4.120.0070.00517.78
8.4.110.0090.01022.61
8.4.100.0110.00917.81
8.4.90.0130.00720.29
8.4.80.0120.00819.05
8.4.70.0100.00920.58
8.4.60.0100.01019.00
8.4.50.0030.00623.71
8.4.40.0150.00417.66
8.4.30.0170.00317.71
8.4.20.0170.00317.79
8.4.10.0160.00019.55
8.3.280.0100.01218.42
8.3.270.0090.01116.60
8.3.260.0050.00416.82
8.3.250.0130.00616.44
8.3.240.0110.00816.87
8.3.230.0050.00616.41
8.3.220.0040.00318.91
8.3.210.0100.01016.88
8.3.200.0050.00416.64
8.3.190.0090.00617.02
8.3.180.0080.01218.40
8.3.170.0120.00618.96
8.3.160.0090.00616.62
8.3.150.0120.00618.61
8.3.140.0040.01116.75
8.3.130.0040.00418.52
8.3.120.0060.00320.81
8.3.110.0060.00320.94
8.3.100.0080.00024.06
8.3.90.0070.01126.77
8.3.80.0060.00317.97
8.3.70.0070.01018.05
8.3.60.0120.00918.55
8.3.50.0140.00822.21
8.3.40.0110.00418.68
8.3.30.0150.00018.67
8.3.20.0040.00420.32
8.3.10.0090.00621.91
8.3.00.0110.00017.35
8.2.290.0090.00116.57
8.2.280.0100.00918.33
8.2.270.0070.01117.33
8.2.260.0030.00618.92
8.2.250.0050.00316.82
8.2.240.0110.00416.98
8.2.230.0130.00322.58
8.2.220.0000.00837.54
8.2.210.0170.00026.77
8.2.200.0040.00418.16
8.2.190.0120.00916.58
8.2.180.0100.01016.38
8.2.170.0070.01022.96
8.2.160.0070.00719.29
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00022.43
8.2.120.0070.00026.35
8.2.110.0060.00319.45
8.2.100.0000.01117.91
8.2.90.0040.00418.03
8.2.80.0080.00018.05
8.2.70.0090.00018.03
8.2.60.0060.00318.22
8.2.50.0090.00018.16
8.2.40.0070.00420.42
8.2.30.0000.00719.31
8.2.20.0050.00317.71
8.2.10.0000.00718.11
8.2.00.0050.00218.00
8.1.330.0110.00816.24
8.1.320.0100.00815.93
8.1.310.0090.00918.63
8.1.300.0070.00716.66
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0000.00723.84
8.1.260.0070.01028.09
8.1.250.0040.00428.09
8.1.240.0040.00819.46
8.1.230.0090.00322.75
8.1.220.0030.00517.78
8.1.210.0050.00318.77
8.1.200.0040.00417.35
8.1.190.0080.00017.23
8.1.180.0000.00818.10
8.1.170.0000.00818.63
8.1.160.0070.00022.01
8.1.150.0080.00018.89
8.1.140.0040.00719.63
8.1.130.0000.00717.77
8.1.120.0000.00717.46
8.1.110.0040.00417.45
8.1.100.0000.00717.53
8.1.90.0000.00717.46
8.1.80.0000.00717.38
8.1.70.0000.00817.38
8.1.60.0040.00417.59
8.1.50.0000.00817.43
8.1.40.0030.00517.41
8.1.30.0040.00417.66
8.1.20.0040.00417.65
8.1.10.0050.00317.53
8.1.00.0040.00417.50
8.0.300.0040.00419.59
8.0.290.0000.00716.75
8.0.280.0080.00018.45
8.0.270.0070.00017.13
8.0.260.0030.00317.31
8.0.250.0050.00216.97
8.0.240.0080.00016.97
8.0.230.0000.00916.86
8.0.220.0030.00316.83
8.0.210.0100.00016.86
8.0.200.0000.00716.86
8.0.190.0000.00716.92
8.0.180.0000.00816.93
8.0.170.0080.00016.94
8.0.160.0040.00416.79
8.0.150.0040.00416.73
8.0.140.0000.00716.86
8.0.130.0000.00513.28
8.0.120.0040.00416.82
8.0.110.0030.00616.89
8.0.100.0030.00616.86
8.0.90.0030.00516.77
8.0.80.0060.01016.88
8.0.70.0040.00416.96
8.0.60.0040.00416.95
8.0.50.0050.00216.89
8.0.30.0080.00917.15
8.0.20.0120.01117.40
8.0.10.0070.00017.05
8.0.00.0130.01016.70
7.4.330.0050.00015.09
7.4.320.0030.00316.66
7.4.300.0030.00316.64
7.4.290.0030.00316.63
7.4.280.0000.00816.52
7.4.270.0000.00616.50
7.4.260.0040.00316.53
7.4.250.0000.00916.52
7.4.240.0060.00216.48
7.4.230.0000.00716.39
7.4.220.0090.00916.60
7.4.210.0060.01116.64
7.4.200.0000.00716.67
7.4.160.0000.01516.41
7.4.150.0060.01217.40
7.4.140.0090.00817.86
7.4.130.0080.01116.59
7.4.120.0070.01016.41
7.4.110.0030.01316.62
7.4.100.0100.01016.58
7.4.90.0150.00316.63
7.4.80.0060.01219.39
7.4.70.0060.00916.36
7.4.60.0130.00316.65
7.4.50.0070.00416.64
7.4.40.0080.00816.70
7.4.30.0100.00616.52
7.4.00.0060.00314.86
7.3.330.0070.00313.44
7.3.320.0030.00313.37
7.3.310.0030.00316.41
7.3.300.0060.00016.30
7.3.290.0030.00316.28
7.3.280.0070.01016.34
7.3.270.0130.00317.40
7.3.260.0110.00616.39
7.3.250.0110.00716.50
7.3.240.0120.00916.49
7.3.230.0090.00916.41
7.3.210.0080.00816.45
7.3.200.0060.01016.54
7.3.190.0080.01216.59
7.3.180.0130.00416.42
7.3.170.0100.00716.38
7.3.160.0030.01516.28
7.3.10.0040.01116.69
7.3.00.0000.01016.74
7.2.330.0120.00616.75
7.2.320.0120.00416.72
7.2.310.0100.00716.58
7.2.300.0120.00916.57
7.2.290.0100.00616.47
7.2.130.0100.00316.87
7.2.120.0000.01316.88
7.2.110.0100.00616.51
7.2.100.0090.00316.84
7.2.90.0030.00816.56
7.2.80.0100.00316.86
7.2.70.0060.00317.02
7.2.60.0060.00816.76
7.2.50.0060.01016.89
7.2.40.0060.00916.68
7.2.30.0030.01017.08
7.2.20.0110.00316.86
7.2.10.0040.00817.09
7.2.00.0080.00218.10
7.1.250.0040.00415.62
7.1.200.0030.00715.86
7.1.70.0000.00817.19
7.1.60.0040.00719.38
7.1.00.0030.07722.57
7.0.200.0470.00714.58
7.0.80.0130.06019.97
7.0.70.0170.06319.97
7.0.60.0100.07320.07
7.0.50.0100.06320.45
7.0.40.0200.05720.30
7.0.30.0670.07320.40
7.0.20.0030.07720.30
7.0.10.0530.06720.29
7.0.00.0570.06020.33
5.6.230.0070.06320.59
5.6.220.0100.07020.77
5.6.210.0070.07720.57
5.6.200.0100.07321.07
5.6.190.0200.08021.07
5.6.180.0130.07021.11
5.6.170.0130.06321.06
5.6.160.0070.06321.07
5.6.150.0130.05721.04
5.6.140.0230.05021.09
5.6.130.0170.06021.10
5.6.120.0230.05720.96
5.6.110.0130.06721.07
5.6.100.0270.05021.00
5.6.90.0100.06321.00
5.6.80.0170.05020.40
5.6.70.0070.06320.40
5.6.60.0170.07020.43
5.6.50.0170.06020.48
5.6.40.0200.05320.37
5.6.30.0170.06720.43
5.6.20.0200.05320.45
5.6.10.0370.06020.45
5.6.00.0100.06020.40

preferences:
39.71 ms | 403 KiB | 5 Q