| // +----------------------------------------------------------------------+ // // $Id: constant.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $ // /** * Replace constant() * * @category PHP * @package PHP_Compat * @link http://php.net/constant * @author Aidan Lister * @version $Revision: 1.1.2.1 $ * @since PHP 4.0.4 * @require PHP 4.0.1 (trigger_error) */ if (!function_exists('constant')) { function constant ($constant) { if (!defined($constant)) { $error = sprintf('constant() Couldn\'t find constant %s', $constant); trigger_error($error, E_USER_WARNING); return false; } eval("\$value=$constant;"); return $value; } } ?>