| Home / Section index | www.icosaedro.it | ![]() |
Contents Introduction Basic features Packages Importing modules Importing packages Autoloading classes Namespaces Constants Predefined constants Global variables Predefined superglobals Types Arrays Type compatibility Typecasting Classes Recursive declarations Control structures Definite assignment analysis Functions Errors Exceptions PHPLint's Std. Library Documentator Usage How To... (PHP4) Classes (PHP4) (PHP4) Type conversion operators Reserved keywords To-do list Memorandum License References Syntax |
Contents of this chapter Reserved keywordsThere are some differences on how PHP and PHPLint scan the source of a program. PHPLint behave much like a compiler would, first scanning the source in distinct symbols and keywords, then parsing the semantic of these symbols. Instead, the PHP interpreter act much like a scripting language would do, and some of the words that compose the source have a meaning that depend on the context. PHP keywordsThese keywords are reserved by the parser of the PHP code, and cannot be used for names of constants, variables, functions, classes, class constants, properties or methods.
This list of keywords is longer than that stated by the PHP manual. Moreover, variables, properties and methods cannot take the name of a keyword, also if this name might be valid for the PHP interpreter. For example, this code:
is valid for the PHP 5 interpreter, but it is not for PHPLint because the
constant name PHPLint keywords
These keywords are reserved by PHPLint when parsing the extended code
inside the comments "
Since the extended code can include the class names, class names cannot collide with these keywords.
|
| Umberto Salsi | Contact | Site map | Home / Section index |