Re: Re: PHP in HTML code

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

 



On Thu, 2010-03-18 at 17:32 +0100, Jan G.B. wrote:

> 2010/3/18 tedd <tedd.sperling@xxxxxxxxx>:
> > Calling it "ranting" or "religious" unjustly demeans the discussion and is
> > inflammatory.
> > In all of this, I've simply said it's your choice.
> 
> What I said was:
> *persons ranting about short open tags* *are just like some religious people
> *
> 
> I did not address you.
> 
> On the other hand you're telling people here that their approach is "worse"
> and yours is great. IMHO this isn't a discussion but bashing without any
> reasoning.
> You simply say that XML is confused by a short open tag, but actually PHP is
> not embedded in XML.
> 
> I quote you:
> > that's your choice -- but your decision is also a demonstration to your
> client/employer/peers as to your desire to produce the "best" possible code.
> > I look at code containing "<?=" the same way as I see html containing
> tables and embedded styling for presentation -- "This must be old code OR
> the programmer still doesn't get it".
> 
> You make it very clear that you believe in your superior coding style.


Technically, PHP isn't embedded in any language; it's the other way
around.

XML and PHP are used together more often than you might realise.
Consider Ajax and RSS, which are becoming more and more popular. Also,
there are sites out there that are almost entirely XML-based; just have
a look at the World of Warcraft (yes I play it!) website.

For me, I originally learnt PHP using the <?php tags. I only found out
about short tags when I first ran into the problem with them on shared
hosting that had them turned off. To me, it didn't make much sense in
using something that wasn't portable. For the same reason, I try to
avoid using obscure PHP modules when I know a system will end up on a
closed hosting platform like this.

I hear the arguments that short tags make code easier to read and write,
but from experience, a good syntax highlighter does the trick for the
former, and I don't feel that typing a few extra characters is really
delaying me by much.

I have seen someone argue about screen readers having problems by
reading out the <?php each time, and I don't know how that would be
dealt with in reality. Are there PHP-aware screen readers about, or at
least screen readers that might be told to ignore particular patterns of
content?

Thanks,
Ash
http://www.ashleysheridan.co.uk



[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