Skip to content

Comment on PHP Hacking aka trying to push PHP internals forwardsparent

Comments

But, less than question mark and a space are not a valid XML combination. XML processing instructions cannot begin with a space. Likewise, PHP cannot run commands into the short tags, like <?echo $foo; ?>. So, there really is no collision, it's just grandstanding.

I wonder if the XML PI spec says anything about <?= Can you have a PI start with = ? If not, the echo short tag should stay for certain.

'<?=' is invalid XML. '<?' must be followed by a valid XML Name.

See http://www.w3.org/TR/2008/REC-xml-20081126/#sec-pi

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.