Why "<?" doesn't work anymore and instead only "<? php" works?
I used xampp for local development, and then I installed PHP from a direct installer. Now, in some of my PHP code, only PHP code starting with "<?php " is correctly parsed. Everything that starts with " <? " Or " <?= " <?= completely ignored and simply remains as it is.
How to configure for analysis or tokens?
This is the php.ini parameter named
short_open_tag = 1 # (enabled) I recommend disabling short_open_tag and only work with <?php . If short_open_tag enabled, it may encounter XML processing <?xml , because both the open PHP tag and the XML PI begin with <? .
Using only <? like starting a preprocessor, you can get a preprocessor confused with well-formed XML documents. XML costs <? for processing instructions, imagine an XHTML document with embedded XML that requires XSLT processing ... The preprocessor will get confused with the instructions for processing stylesheets and will cause an error.
It is recommended to use the processor start tag <php , try using short_open_tag = Disable in php.ini. Alternatively, you can try using <?php ini_set('short_open_tag', 'On'); > <?php ini_set('short_open_tag', 'On'); > if problems arise.
You can set short_open_tag = On in php.ini
This is a configuration parameter, more information about: http://www.php.net/ini.core (look for short_open_tag).
For a newer version:
short_open_tag = On