PhpSandbox\PHPSandbox::undefineVars PHP 메소드

undefineVars() 공개 메소드

You can pass an array of variable names to undefine, or an empty array or null argument to undefine all variables
public undefineVars ( array $variables = [] )
$variables array Array of variable names to undefine. Passing an empty array or no argument will result in undefining all variables
    public function undefineVars(array $variables = [])
    {
        if (count($variables)) {
            foreach ($variables as $variable) {
                $this->undefineVar($variable);
            }
        } else {
            $this->definitions['variables'] = [];
        }
        return $this;
    }
PHPSandbox