Transphpile\Transpile\NodeStateStack::push PHP Method

push() public method

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