eval() is the best for all sorts of things
If eval() is the answer, you're almost certainly asking the wrong question.