I don't know other method to evaluate code, but depend on your need, you should be able to have what you are expected with another way (switch, etc..). Can you give us more explanations about the purpose ..?
For example i have associative array, $adata = array('name' => 'John', 'age' => 21); i have a function that convert that to a string so the output will be like this, $condition = "if($name == 'John' && $age == 21);"; and i want $condition to be converted into a regular conditional expression.
EVIL, oh I meanEVAL(), is your best bet