| // +----------------------------------------------------------------------+ // // $Id: constant.php,v 1.7 2005/01/26 04:55:13 aidan Exp $ /** * Replace constant() * * @category PHP * @package PHP_Compat * @link http://php.net/function.constant * @author Aidan Lister * @version $Revision: 1.7 $ * @since PHP 4.0.4 * @require PHP 4.0.0 (user_error) */ if (!function_exists('constant')) { function constant($constant) { if (!defined($constant)) { $error = sprintf('constant() Couldn\'t find constant %s', $constant); user_error($error, E_USER_WARNING); return false; } eval("\$value=$constant;"); return $value; } } ?>