yii\validators\Validator::isEmpty PHP Method

isEmpty() public method

A value is considered empty if it is null, an empty array, or an empty string. Note that this method is different from PHP empty(). It will return false when the value is 0.
public isEmpty ( mixed $value ) : boolean
$value mixed the value to be checked
return boolean whether the value is empty
    public function isEmpty($value)
    {
        if ($this->isEmpty !== null) {
            return call_user_func($this->isEmpty, $value);
        } else {
            return $value === null || $value === [] || $value === '';
        }
    }