, Arpad Ray * @link http://php.net/function.constant * @author Aidan Lister * @version $Revision: 1.10 $ * @since PHP 4.0.4 * @require PHP 4.0.0 (user_error) */ function php_compat_constant($constant) { if (!defined($constant)) { $error = sprintf('constant() Couldn\'t find constant %s', $constant); user_error($error, E_USER_WARNING); return false; } $value = null; eval("\$value=$constant;"); return $value; } // Define if (!function_exists('constant')) { function constant($constant) { return php_compat_constant($constant); } }