Thanks. This saved my bacon.
I was using view templates to construct outbound XML files, and suddenly it was broke in dev but working fine in production.
Having recently switched to Herd, your posting foresaw my problem perfectly.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have blade files for some XML calls. They start with this line
<?xml version="1.0"?>
I changed from valet to Herd recently and I started to get this error
syntax error, unexpected identifier "version"
Turns out the problem was that Herd has short php On by default. It was trying to render stuff after <? as PHP. The solution was to set
short_open_tag=Off
in my php.ini file. If you don't have access you can instead change your code to
<?php
echo '<?xml version="1.0" encoding="utf-8"?>';
?>
Please or to participate in this conversation.