| Home / Section index | www.icosaedro.it | ![]() |
The dummy package
This dummy package is loaded by default by PHPLint on-line. It simply
imports the standard module that contains the definitions of
functions and other resources commonly available in every PHP installation,
like fopen(), strlen() and so on.
Since most visitors of the PHPLint on-line interface forget (or simply
still do not have realized) to require this module, they are confused by
so many error messages PHPLint raises on apparently "unknown" functions as
common as count() or isset(). A minor downside of
this approach is that on very simple chunk of code that does not use any
of the resources exported by the standard module (for example
<?php echo "hello world"; ?>), PHPLint will complain
about this package being imported but actually not used.
To summarize, every PHP source of practical use should contain these PHPLint meta-code instructions that includes the standard module and some of the most popular extensions:
<?php
/*.
require_module 'standard';
require_module 'mysql';
require_module 'pcre';
.*/
?>
Please note that the name of the module is a single-quoted string.
This declaration appears very similar to the PHP instruction
require_once, but actually it is ignored by PHP since it is
only a comment /*. .*/.
You can read more about the standard module at this URL
www.icosaedro.it/phplint/modules.cgi?module=/standard.html.
| Umberto Salsi | Contact | Site map | Home / Section index |