Php v8 doesnt support shortags?!


I recently updated the server to php v8. My website all broke. Turns out v8 doesnt support php short tags!

Does that mean I have to type an extra ‘php’ every time I open a php tag? :frowning:

Curious to hear what others think about this.


I’m pretty sure PHP8 does support short tags. Have you checked your php.ini settings?

1 Like

Hmm. Perhaps I have my wires crossed. I will investigate further.

Just a note, it is advised in PSR-1 that you should always use the <?php ?> or <?= ?> (what I would call inline echo form) forms. So it might be wise to make sure you change all the tags to <?php ?> and not actually use the short tags version. :slight_smile:

1 Like

It does not. It supports <?= $somevar ?>, but not <? echo $somevar; ?>.


1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.