in reply to symbol table vs. eval

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 '.