protected function isReservedPHPWord($word)
    {
        $word = strtolower($word);

        $keywords = [
            '__halt_compiler',
            'abstract',
            'and',
            'array',
            'as',
            'break',
            'callable',
            'case',
            'catch',
            'class',
            'clone',
            'const',
            'continue',
            'declare',
            'default',
            'die',
            'do',
            'echo',
            'else',
            'elseif',
            'empty',
            'enddeclare',
            'endfor',
            'endforeach',
            'endif',
            'endswitch',
            'endwhile',
            'eval',
            'exit',
            'extends',
            'final',
            'for',
            'foreach',
            'function',
            'global',
            'goto',
            'if',
            'implements',
            'include',
            'include_once',
            'instanceof',
            'insteadof',
            'interface',
            'isset',
            'list',
            'namespace',
            'new',
            'or',
            'print',
            'private',
            'protected',
            'public',
            'require',
            'require_once',
            'return',
            'static',
            'switch',
            'throw',
            'trait',
            'try',
            'unset',
            'use',
            'var',
            'while',
            'xor'
        ];

        $predefined_constants = [
            '__CLASS__',
            '__DIR__',
            '__FILE__',
            '__FUNCTION__',
            '__LINE__',
            '__METHOD__',
            '__NAMESPACE__',
            '__TRAIT__'
        ];

        return in_array($word, $keywords) || in_array($word, $predefined_constants);
    }
protected function isReservedPHPWord($word)
    {
        $word = strtolower($word);

        $keywords = [
            '__halt_compiler',
            'abstract',
            'and',
            'array',
            'as',
            'break',
            'callable',
            'case',
            'catch',
            'class',
            'clone',
            'const',
            'continue',
            'declare',
            'default',
            'die',
            'do',
            'echo',
            'else',
            'elseif',
            'empty',
            'enddeclare',
            'endfor',
            'endforeach',
            'endif',
            'endswitch',
            'endwhile',
            'eval',
            'exit',
            'extends',
            'final',
            'for',
            'foreach',
            'function',
            'global',
            'goto',
            'if',
            'implements',
            'include',
            'include_once',
            'instanceof',
            'insteadof',
            'interface',
            'isset',
            'list',
            'namespace',
            'new',
            'or',
            'print',
            'private',
            'protected',
            'public',
            'require',
            'require_once',
            'return',
            'static',
            'switch',
            'throw',
            'trait',
            'try',
            'unset',
            'use',
            'var',
            'while',
            'xor'
        ];

        $predefined_constants = [
            '__CLASS__',
            '__DIR__',
            '__FILE__',
            '__FUNCTION__',
            '__LINE__',
            '__METHOD__',
            '__NAMESPACE__',
            '__TRAIT__'
        ];

        return in_array($word, $keywords) || in_array($word, $predefined_constants);
    }
protected function isReservedPHPWord ( $ word ) { $ word = strtolower ( $ word ) ; $ keywords = [ '__halt_compiler' , 'abstract' , 'and' , 'array' , 'as' , 'break' , 'callable' , 'case' , 'catch' , 'class' , 'clone' , 'const' , 'continue' , 'declare' , 'default' , 'die' , 'do' , 'echo' , 'else' , 'elseif' , 'empty' , 'enddeclare' , 'endfor' , 'endforeach' , 'endif' , 'endswitch' , 'endwhile' , 'eval' , 'exit' , 'extends' , 'final' , 'for' , 'foreach' , 'function' , 'global' , 'goto' , 'if' , 'implements' , 'include' , 'include_once' , 'instanceof' , 'insteadof' , 'interface' , 'isset' , 'list' , 'namespace' , 'new' , 'or' , 'print' , 'private' , 'protected' , 'public' , 'require' , 'require_once' , 'return' , 'static' , 'switch' , 'throw' , 'trait' , 'try' , 'unset' , 'use' , 'var' , 'while' , 'xor' ] ; $ predefined_constants = [ '__CLASS__' , '__DIR__' , '__FILE__' , '__FUNCTION__' , '__LINE__' , '__METHOD__' , '__NAMESPACE__' , '__TRAIT__' ] ; return in_array ( $ word , $ keywords ) || in_array ( $ word , $ predefined_constants ) ; }
Returns true if the given word is a php keyword.
@param string $word
@return bool
Returns true if the given word is a php keyword .