回答編集履歴
1
コードの最適化
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
function is_array_empty($InputVariable) {
|
4
4
|
|
5
|
-
$
|
5
|
+
$result = true;
|
6
6
|
|
7
7
|
|
8
8
|
|
@@ -10,19 +10,19 @@
|
|
10
10
|
|
11
11
|
foreach ($InputVariable as $Value) {
|
12
12
|
|
13
|
-
$
|
13
|
+
$result = $result && is_array_empty($Value);
|
14
14
|
|
15
15
|
}
|
16
16
|
|
17
17
|
} else {
|
18
18
|
|
19
|
-
$
|
19
|
+
$result = empty($InputVariable);
|
20
20
|
|
21
21
|
}
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
-
return $
|
25
|
+
return $result;
|
26
26
|
|
27
27
|
}
|
28
28
|
|