ID: 8863 Updated by: jan Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: Feature/Change Request Operating System: Any PHP Version: 4.0.4pl1 New Comment:
and close it Previous Comments: ------------------------------------------------------------------------ [2002-01-06 13:00:36] [EMAIL PROTECTED] see get_defined_constants ------------------------------------------------------------------------ [2001-01-23 12:21:28] [EMAIL PROTECTED] I believe PHP lacks a function to get constant values by name where the constant's name is stored in a string variable. What I mean is something like function get_constant($const_name) { eval ("\$myvar = " . $const_name . ";"); return $myvar; } but I really think that using eval() here is a waste. Am I missing something? andrew ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=8863&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]