I have a var: $a. I don\'t know what it is. I want to check if I can count it. Usually, with only array, I can do this:
$a
if (is_array($a)) {
According to the documentation, You can use is_countable function:
is_countable
if (is_countable($a)) { echo count($a); }