PhpSandbox\PHPSandbox::undefineConsts PHP Méthode

undefineConsts() public méthode

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