Enable short tags

Hi, I’m moving my dev sites over to local.

We use short tags in our development and this doesn’t work with local.

A short tag is <?= or <? instead of <?php

This can be enabled in php.ini I believe by adding:

short_open_tag=On

Can you let us know how we can do this with local and if not if you can add this as a feature. Quite a critical one for me.

Elliot

Answer.

  • Head to /conf/php/
  • Find PHP ver
  • Amend short_open_tag = On

Voila!

1 Like

This really should be the default :confused:

We’ll look into making this the default in a future version. Sorry for the trouble!

With that said, there is one benefit to this:

If you’re developing WordPress plugins/themes for distribution, having short tags disabled is a good way to make sure you’re not using them. Like this Local config, some hosts don’t have short tags enabled.