|
Posted by seaside on 12/18/06 00:12
Dikkie Dik schrieb:
> You can use the eval function to go the other way around (not tested):
>
> function traceVariable($name)
> {echo $name . ' = ' . var_export(eval('return ' . $name), TRUE);}
>
> You'd call it with traceVariable('$_SERVER[\'PHP_SELF\']');
Hey, nice idea!
If PHP had a preprocessor, I could even prepare a #define() macro,
which
passes the passed literla-string and its expression along.
Unfortunately, I don't
know of any.
Navigation:
[Reply to this message]
|