Rasmus Lerdorf wrote:
There are a bunch of factors here. In the end it comes down to the
purists vs. the pragmatists. You all know where I fall on that one.
<?php is for the purists and <? and <?= still exists for the pragmatists.
Now, someone mentioned <?php= which I am completely against as it breaks
the purist side. A PI tag is defined as <?<label><whitespace> and I am
pretty sure the PI label names can't contain '='. <?php was added and
adopted in order to be correct, let's not break that correctness.
Most of the arguments I have seen are basically saying <? is evil and it
shouldn't even exist, but that isn't the current question. It does
exist, and we aren't removing it, so the only real argument here is the
WTF factor introduced by code that is able to enabled or disable these
tags on the fly. That's the one and only valid argument I have seen.
I think I'm a purist pragmatist ;)
I HAVE been moving to <?php but I've still got a lot of code that is <?.
Having just taken a close look at the differences, the main thing is that all
the old code has lots of in line html and adding 'php' everywhere ( actually
4500 hits ) will make it even more difficult to read. However *I* am the only
person using that code, and simply remembering to switch back on short tags on
a new installation allows the old stuff to work.
All my new work is going via bitweaver and I was a little surprised to find
only 10 <? entries in the whole of the code base, since it's using smarty to
pump out the html. And most of those seem to be either mistakes - '<? php' or
are actually in SQL - and wrong :)
An hour ago I would have said I needed <? but now I'm more than happy that
since *I* am being dragged the right way by the other bitweaver members - <?
will become a thing of the past for me. HOWEVER quick and dirty pages will no
doubt come out of the shop here simply because there are so many quite complex
pages in the archive and I'm not sure a global convert - while easy to do - is
appropriate.
Bottom line. Global does not work for me - yet, directory level does and I
can't see any logical reason now for switching on and off at will. If it's in
a short tag directory that will do for me - now I just need to actually do that :)
--
Lester Caine - G8HFL
-----------------------------
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php