src/Execution.php
public function removeVariable($name)
    {
        $exec = $this;
        
        while ($exec !== null) {
            if ($exec->isScope()) {
                $exec->removeVariableLocal($name);
            }
            
            if ($exec->isScopeRoot()) {
                break;
            }
            
            $exec = $exec->getParentExecution();
        }
    }
public function removeVariable($name)
    {
        $exec = $this;
        
        while ($exec !== null) {
            if ($exec->isScope()) {
                $exec->removeVariableLocal($name);
            }
            
            if ($exec->isScopeRoot()) {
                break;
            }
            
            $exec = $exec->getParentExecution();
        }
    }
Remove a variable, will remove the variable from all parent scopes up to the scope root.

@param string $name