質問編集履歴
1
関数名を変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -36,13 +36,13 @@
|
|
36
36
|
|
37
37
|
$ary = ["東京", "", "大阪", null, false, "沖縄", 0];
|
38
38
|
|
39
|
-
$results = array_filter($ary, 'check_empty_a
|
39
|
+
$results = array_filter($ary, 'check_empty_val');
|
40
40
|
|
41
41
|
var_dump($results);
|
42
42
|
|
43
43
|
|
44
44
|
|
45
|
-
function check_empty_a
|
45
|
+
function check_empty_val($v) {
|
46
46
|
|
47
47
|
return !(is_null($v) || $v === "");
|
48
48
|
|