IMHO, feel free to include short_open_tag if you want, and it is safe to ignore this warning issued by Symfony. Heck, I would advocate deleting a check completely.
The two possible problems that you cite are the only theoretical problems that you may encounter when using short open tags, but in practice this has never been a problem for me in 10 years of developing PHP applications.
Even in an XML heavy application, it is unlikely that you have an XML header processed by PHP in more than a few places, and in those few cases the problem is easily circumvented, for example, by echoing from the XML header itself. In this era of post-XHTML, it is even more unlikely that you will develop any web application with an XML header in a PHP template. Controversial argument for a start.
As for the server configuration, even average shared web hosting allows you to change the PHP configuration these days, and this parameter, in particular, can even be set at runtime in a remote feature that you cannot. And who in any case deploys Symfony applications to shared hosting?
Short open tags need some love, and they get some from PHP 5.4, where the echo syntax ( <?= ?> ) Will be enabled regardless of the short_open_tag parameter. Also, while some might argue, short tags are by no means an obsolete PHP function and remain here.
If you use PHP templates and prefer short tag syntax, follow it!
Gerry
source share