Language and development rules: Difference between revisions

Jump to navigation Jump to search
Line 13: Line 13:
* Dolibarr is written with PHP and supports all PHP version higher than {{PHPMinVersion}}. All files must end with extension .php
* Dolibarr is written with PHP and supports all PHP version higher than {{PHPMinVersion}}. All files must end with extension .php


* Usage of superglobals PHP variables must use dedicated operators $_GET, $_POST, $_COOKIES, $_SERVER, $_ENV.
* Usage of superglobals PHP variables must use dedicated operators $_COOKIES, $_SERVER, $_ENV and use dolibarr function GETPOST() to get content of $_GET ou $_POST..
Other operators ($HTTP_SERVER_GET, ...) are now deprecated inside PHP, so they must no more be used. Like that code will works alos if option '''register_long_arrays''' is to off.
Other operators ($HTTP_SERVER_GET, ...) are now deprecated inside PHP, so they must no more be used. Like that code will works alos if option '''register_long_arrays''' is to off.
Moreover, the code must works when PHP option '''register_globals''' is off (recommanded by PHP). It must works the same way that when option '''register_globals''' is on (by default on a lot of installations).
Moreover, the code must works when PHP option '''register_globals''' is off (recommanded by PHP). It must works the same way that when option '''register_globals''' is on (by default on a lot of installations).

Navigation menu