Re: Re: Bug #17179: evaluation constants

From: Date: Mon, 13 May 2002 13:37:56 +0000
Subject: Re: Re: Bug #17179: evaluation constants
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-83989@lists.php.net to get a copy of this message
Hi, > This makes the code unmaintainable and > unreadable. What would the real world usage over a function > be? I agree. Also the sample code he provided could be simply executed using the eval command... i.e: def("AAA", "echo(\"bla\");"); //"evaluate" constant definition and then calling it with eval(AAA); //using constant instead of just "AAA". Personally putting the "eval" in there makes is clearer too, and more secure as there are less accidents likely to happen. - Dan > - Markus > > On Mon, May 13, 2002 at 01:09:53PM -0000, joy@1984.cz wrote : >> From: joy@1984.cz >> Operating system: Linux >> PHP version: 4.2.0 >> PHP Bug Type: Feature/Change Request >> Bug description: evaluation constants >> >> Hello, >> I have this idea: >> >> <? >> >> def("AAA", "echo(\"bla\");"); //"evaluate" constant >> definition >> >> AAA AAA //using constant >> >> ?> >> >> will substitute >> >> <? >> echo("bla"); echo("bla"); >> ?> >> >> >> What do you mean about this feature? >> Thanks, Mark Vydra >> -- >> Edit bug report at http://bugs.php.net/?id=17179&edit=1 >> -- >> Fixed in CVS: >> http://bugs.php.net/fix.php?id=17179&r=fixedcvs >> Fixed in release: >> http://bugs.php.net/fix.php?id=17179&r=alreadyfixed >> Need backtrace: >> http://bugs.php.net/fix.php?id=17179&r=needtrace Try >> newer version: >> http://bugs.php.net/fix.php?id=17179&r=oldversion Not >> developer >> issue: http://bugs.php.net/fix.php?id=17179&r=support >> Expected >> behavior: >>http://bugs.php.net/fix.php?id=17179&r=notwrong Not enough >> info: >> http://bugs.php.net/fix.php?id=17179&r=notenoughinfo >> Submitted twice: >> http://bugs.php.net/fix.php?id=17179&r=submittedtwice >> register_globals: >> http://bugs.php.net/fix.php?id=17179&r=globals > > -- > Please always Cc to me when replying to me on the lists. > GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc > "I'm not stupid, you know? :)" - Jani Taskinen > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php -- Dan Hardiker [dhardiker@staff.firstcreative.net] ADAM Software & Systems Engineer

« previous php.dev (#83989) next »