Skip to content

Commit 44118dc

Browse files
committed
Inform return type of bool
1 parent 5cc4c91 commit 44118dc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ext/standard/basic_functions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2587,7 +2587,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_is_iterable, 0, 0, 1)
25872587
ZEND_ARG_INFO(0, var)
25882588
ZEND_END_ARG_INFO()
25892589

2590-
ZEND_BEGIN_ARG_INFO_EX(arginfo_is_countable, 0, 0, 1)
2590+
ZEND_BEGIN_ARG_INFO(arginfo_is_countable, 0)
25912591
ZEND_ARG_INFO(0, var)
25922592
ZEND_END_ARG_INFO()
25932593
/* }}} */

ext/standard/tests/general_functions/is_countable_with_variables.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Test is_countable() function
66
var_dump(is_countable([1, 2, 3]));
77
var_dump(is_countable((array) 1));
88
var_dump(is_countable((object) ['foo', 'bar', 'baz']));
9-
9+
var_dump(is_countable());
1010

1111
$foo = ['', []];
1212

@@ -24,6 +24,9 @@ if (!is_countable($bar)) {
2424
bool(true)
2525
bool(true)
2626
bool(false)
27+
28+
Warning: is_countable() expects exactly 1 parameter, 0 given in %s on line %d
29+
NULL
2730
int(2)
2831

2932
Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d

0 commit comments

Comments
 (0)