You can make your code safer by replacing
eval("\$$test = '$default_value';");
with
${eval('\$' . $test)} = $default_value;
For example, it will work even if the value in $default_value contains the character '.
In reply to Re: symbol table vs. eval
by ikegami
in thread symbol table vs. eval
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |