Re: Is echo tag reasonably portable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/15/05, Jochem Maas <jochem@xxxxxxxxxxxxx> wrote:
>
> Jim Moseby wrote:
> >>Robin Vickery wrote:
> >>
> >>>On 11/15/05, Roman Ivanov <gamblergluck@xxxxxxxxx> wrote:
> >>>
> >>>
> >>>>Can '<?=' be used for templates, or is it "a bad thing"?
> >>>
> >>>
> >>>The manual's reasonably explicit on the subject:
> >>>
> >>>"Note: Using short tags should be avoided when developing
> >>>applications or libraries that are meant for redistribution, or
> >>>deployment on PHP servers which are not under your control, because
> >>>short tags may not be supported on the target server. For portable,
> >>>redistributable code, be sure not to use short tags."
> >>
> >>I've seen this note. But I haven't seen a single server where
> >>short tags
> >>were disabled.
> >
> >
> > Nor have I. However, if I use long tags, my script will *always* work.
> If
> > I use short tags there is a *possibility* that it won't. So, when
> writing
> > code that is required to be portable, there is no reason to ever use
> short
> > tags.
>
> so how many people actually _need_ to write portable code? ok so many you
> are starting a project which will become a runaway success but until it
> starts
> receiving alot of attention use of short-open-tags is probably not your
> biggest
> issue either.
>
> lets assume that everyone should be writing completely portable apps, why
> does this
> ini setting exist? what is the point of offering a setting that can be set
> to a
> bad(tm) value by design?
>
>
Its just a best practice similar to setting error reporting to E_STRICT on
development web servers. Why is it such a big deal anyhow, just type the
three extra characters and get it over with. You could also use smarty to
avoid putting PHP in your templates at all.

I will throw in my vote for short open tags = off on the roughly 30 servers
that I administer across various organizations.

-Mike

--
________________________________
Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux