October 2016

PHP may encounter parse errors. These parse errors occur due to incorrect input of the syntax. This type of syntax error can occur while using the eval( ) function as well. This error occurs most often due to the presence of PHP around the PHP strings which has to be evaluated. The opening tags create the errors and once they are removed the problem is solved. The closing tags can be used to quit the model. Insights on webmaster will definitely help solve the problems of PHP parse errors.


When using the eval() function in PHP, the following message is displayed:

PHP Parse error: syntax error, unexpected '<' in /var/www/monfichier.php3(60) : eval()'d code on line 1


  • This is probably due to the presence of PHP tags around the string that needs to be evaluated:
  • As stated in the PHP documentation, PHP opening tags must not be present to assess a string. To fix the problem simply delete the opening tag of the string.
  • Note: you can still use the PHP closing tags to quit from the PHP mode


Related :

This document entitled « PHP PARSE ERROR: UNEXPECTED '<' IN ... EVAL()'D CODE ON L » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.