[nycphp-talk] Short Tags deprecated?

Paul A Houle paul at
Mon Aug 31 13:36:44 EDT 2009

Hans Zaunere wrote:

> Mine does - they aren't "global" but scoped only for that template.  When an
> object is pushed in, it's adapted/wrapped with an object that is designed
> specifically for output in whatever type of template I'm dealing with.
    That could work well,  but I do have some fear that a person who's 
familliar with the framework wouldn't get into the html escaping habit 
when they write some script that depends on it.  I also have times that 
I do string manipulation in a template (or use a function that does 
string manipulation),  and in those cases,  getting stuff escaped out of 
the data layer would be a distraction.

    I often find myself developing tiny things that don't fit entirely 
into a framework and it's nice to have conventions that make it easier 
to do the right thing with or without a framework.
>> few functions that behave differently if serving a web page or run from
>> the command line.
> Ditto - PHP on nails, I like that...
    "Nails" is a library,  not a framework.  Every language makes 
programmers prone to certain mistakes;  goal #1 of nails is to provide 
simple answers to the simple problems that bug PHP programmers day in 
and day out.  For instance,  there are G() and P() functions to get GET 
and POST variables that undo magic_quotes_gpc if it's turned on.

    On top of that I've got a few "framework" stacks that I can put on 
for particular sorts of work...  However,  nails improves the 
readability and reliability of even the simplest scripts,  so long as it 
doesn't run into a namespace conflict.

More information about the talk mailing list