|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-01-06 13:00 UTC] jan@php.net
[2002-01-06 13:00 UTC] jan@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 21:00:02 2025 UTC |
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