PHPSA\CompiledExpression::toVariable PHP Method

toVariable() public method

Creates a variable from the expression.
public toVariable ( string $name ) : Variable
$name string Name of the Variable
return Variable
    public function toVariable($name)
    {
        return new Variable($name, $this->value, $this->type);
    }