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, [EMAIL PROTECTED] wrote :
>> From:             [EMAIL PROTECTED]
>> 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 [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to