Confusion with the calculation result of the query

Why is this code for a successful query and query where there is no result

userid = 1; // or 5000 $user = Users::findFirst("id = '$userid'"); count($user);

always outputs 1

Why if the user does not count it zero?



1.9k

Users::findFirst will return Users object or false.

var_dump(count(false)) => int 1