I'm trying to use the eval function for php. but I'm stuck in handling the parse error. like considering if I have edge cases like 1.. or 1++ if gives me parse error:syntax error, .....
anyone knows how to handle syntax error or how to bypass the error message? I want to give a better error message.
also is it possible to store the error message to a variable?
TIA
From the manual:
But as you won't be calling
eval
on arbitrary code (right?), this shouldn't be a problem.From the manual
Instead use this:
https://3v4l.org/1giOS