News for hackers. Stuff that matters.
Re:PHP Hacking aka trying to push PHP internals forwards by chopsueyar on Friday June 10, 2011 @10:31AM (#2640967)
It is not a unique escape code.

Everytime I type those three little characters, it gives me great pleasure.

Re:PHP Hacking aka trying to push PHP internals forwards by mgkimsal on Friday June 10, 2011 @10:40AM (#2640994)
<%= is a unique escape code

It always bugged me that the PHP community didn't pick up on this and run with it. We've had ASP tags since the beginning (almost?) but I think people avoid it out of some anti-MS stance. Rails runs with <%= just fine.

Re:PHP Hacking aka trying to push PHP internals forwards by hackernewz on Friday June 10, 2011 @10:33AM (#2640973)
Can you give a demonstration of its non-uniqueness?
Re:PHP Hacking aka trying to push PHP internals forwards by duskwuff on Friday June 10, 2011 @10:46AM (#2641018)
<? is used in XML headers.

OTOH, you shouldn't ever be generating XML headers from PHP anyway (XHTML is a dead-end, and raw XML should be generated by an XML library), so this shouldn't be that big of an issue.

Re:PHP Hacking aka trying to push PHP internals forwards by hackernewz on Friday June 10, 2011 @10:51AM (#2641040)
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.
Re:PHP Hacking aka trying to push PHP internals forwards by mgkimsal on Friday June 10, 2011 @10:53AM (#2641048)
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.
Re:PHP Hacking aka trying to push PHP internals forwards by zeen on Friday June 10, 2011 @11:33AM (#2641207)
'<?=' is invalid XML. '<?' must be followed by a valid XML Name.

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