We know eval() evaluates the given string as PHP code. This can be dangerous in our PHP applications. So it should be avoided if possible OR we need to make it secured by checking the code before executing eval() especially if you are planning to execute user input.
Enjoy PHPing !!