Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

is_countable

Description

The is_countable of Variable Handling for PHP verify that the contents of a variable is a countable value.

Syntax

is_countable(mixed $value): bool

Parameters

value

The value to check

Return

Returns true if value is countable, false otherwise.

Examples

1

<?

$value = array();

$return = is_countable($value);

var_export($return);

?>
true

2

<?

$value = array(0, 1);

$return = is_countable($value);

var_export($return);

?>
true

3

<?

$value = new ArrayIterator();

$return = is_countable($value);

var_export($return);

?>
true

4

<?

$array = array(0, 1);

$value = new ArrayIterator($array);

$return = is_countable($value);

var_export($return);

?>
true
HomeMenu