mixed PHP_Compat::loadConstant (
mixed $constant
)
Loads a constant, or an array of constants.
$constant
The name, or an array of names, of constants to load
mixed
Loading a constant with the class:
<?php
require_once 'PHP/Compat.php';
// load E_STRICT
PHP_Compat::loadConstant('E_STRICT');
// load E_STRICT, and PATH_SEPATATOR
PHP_Compat::loadConstant(array('E_STRICT', 'PATH_SEPARATOR'));
// load the STD group of constants (STDIN, STDOUT, STDERR)
PHP_Compat::loadConstant('STD');
?>
You may also load a constant without using the class.
Loading a constant manually:
<?php
require_once 'PHP/Compat/Constant/E_STRICT.php';
?>
This function should be called statically.