PHP | is_countable() Function Last Updated : 21 Apr, 2020 Comments Improve Suggest changes Like Article Like Report The is_countable() function is an inbuilt function in PHP which is used to check whether the content of the variable is countable or not. Syntax: bool is_countable ( mixed $var ) Parameters: This function accepts one parameter as mentioned above and described below: $var: This parameter holds the value which need to be checked. Return Value: This function returns a boolean value i.e. either True if value of variable is countable otherwise returns False. Below programs illustrate the is_countable() function in PHP: Program 1: php <?php // Declare a string $str = "GeeksforGeeks"; var_dump(is_countable($str)); $arr = array(1, 3, 5, 7); var_dump(is_countable($arr)); ?> Output: bool(false) bool(true) Program 2: php <?php // Declare a number $num = 1234; var_dump(is_countable($num)); // Declare an array $arr = array('Welcome', 'to', 'GeeksforGeeks'); var_dump(is_countable($arr)); // Declare a string $str = "GeeksforGeeks"; var_dump(is_countable($str)); // Declare an empty class class GFG { // Empty class } // Create an object of class $obj = new GFG(); var_dump(is_countable($obj)); // Create an array iterator object $itr = new ArrayIterator(); var_dump(is_countable($itr)); ?> Output: bool(false) bool(true) bool(false) bool(false) bool(true) Reference: https://www.php.net/manual/en/function.is-countable.php Comment More infoAdvertise with us Next Article PHP | is_countable() Function A ashokjaiswal Follow Improve Article Tags : Web Technologies PHP PHP-function Similar Reads PHP | is_callable() Function The is_callable() function is an inbuilt function in PHP which is used to verify the contents of a variable can be called as a function. It can check that a simple variable contains the name of a valid function, or that an array contains a properly encoded object and function name. Syntax: bool is_c 2 min read PHP count() Function The count() function in PHP is used to count the number of elements in an array or the countable properties of an object. The function returns an integer value representing the number of items present.Syntax:count($array, mode)In this syntax:$array (mandatory): Refers to the array, whose elements ar 3 min read PHP DsSet count() Function The Ds\Set::count() function of Ds\Set class in PHP is an inbuilt function which is used to count the number of values present in the Set. This is also referred to as the size of the Set instance. Syntax: int public Ds\Set::count() Parameters: This function does not accept any parameter. Return Valu 1 min read PHP is_float() Function PHP is_float() is an inbuilt function in PHP. The is_float() function is used to find whether a variable is a float or not. Syntax: boolean is_float($variable_name) Parameter: This function contains a single parameter as shown in the above syntax and described below $variable_name: the variable we w 2 min read PHP iterator_count() Function The iterator_count() function is an inbuilt function in PHP that is used to count the number of elements in an iterator. An iterator is an object that is a collection of elements. Syntax: iterator_count(Traversable $iterator) : intParameters: This function accepts only one parameter which is describ 1 min read Like