Transphpile\Transpile\NodeStateStack::count PHP Method

count() public method

public count ( $name )
    public function count($name)
    {
        if (count($this->vars) == 0) {
            return null;
        }
        $a = $this->vars[count($this->vars) - 1][$name];
        if (!is_array($a)) {
            throw new \InvalidArgumentException('argument must be an array');
        }
        return count($a);
    }