We are using the PHP feature short_open_tag .

A colleague does not like them and wants to remove them and turn the feature off.

Does magento work with short_open_tag turned off?



To try this out I turned off short_open_tag and ran through a few different tasks on a local instance and everything is fine. There are also 0 instances of the short open tag (on my local instance at least).

That being said (just in case your colleague is assuming they are related)... Is there any point turning it off? Something to be aware of is the short echo tag <?= which you used to need to turn short_echo_tag on for now has no effect on it, in-fact, the short_open_tag parameter no longer exists and you cant even disable them even if building the php binary yourself. Also all of the core instances of <?php echo have been replaced with <?= in this merge https://github.com/magento/magento2/pull/1563/commits

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.