PhpSandbox\PHPSandbox::normalizeMagicConst PHP Méthode

normalizeMagicConst() protected méthode

Normalize magic constant name. This is an internal PHPSandbox function.
protected normalizeMagicConst ( string | array $name ) : string | array
$name string | array String of the magic constant $name, or array of strings to normalize
Résultat string | array Returns the normalized magic constant string or an array of normalized strings
    protected function normalizeMagicConst($name)
    {
        if (is_array($name)) {
            foreach ($name as &$value) {
                $value = $this->normalizeMagicConst($value);
            }
            return $name;
        }
        return strtoupper(trim($name, '_'));
    }
PHPSandbox