OSIFY

PHP syntax error, unexpected $end – can be with short tag

Parse error: syntax error, unexpected $end in … on line …

While I develop a wordpress plugin, I got such error, finally I found that the issue when we use short tag in PHP

<? … ?>

So solutions we can try:

  1. Replace <? by <?php
  2. Enable PHP setting: short_open_tag

Create or edit .htaccess file to enable that setting:

php_flag short_open_tag on