note 39512 added to function.constant
| From: | gphemsley at users dot sourceforge dot net | Date: | Fri, 30 Jan 2004 23:44:57 +0000 |
| Subject: | note 39512 added to function.constant | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-64464@lists.php.net to get a copy of this message | ||
For those of you who need constant() for PHP < 4.0.4, this simple function should do the trick.
<?php
function constant( $name )
{
return @eval( "return $name;" );
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.constant.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39512
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39512&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39512&report=yes
Search -- http://master.php.net/manage/user-notes.php