[nycphp-talk] Short Tags deprecated?

Paul A Houle paul at
Fri Aug 28 16:14:51 EDT 2009

Hans Zaunere wrote:
> Absolutely, some type of shorthand is needed, which is exactly why they
> exist in the first place.  I think the issue with removing <?= was that no
> one could decide what to actually replace it with.  It'll come, wait for
> it...
    Well you're at it,  how about a version of <?= that has 
htmlspecialchars() built in...

    It might be an irresponsible namespace grab,  but I've got a 
function that is (almost)

function Q($s) { echo htmlspecialchars($s) };

    and I get into the habit of writing <?php Q($string) ?> in my 
templates so I'm not writing hundreds of HTML injection bugs all day..

More information about the talk mailing list