5.4.0

Permalink
Is this still correct, and what is up with the PHP short tags?

I thought that died with PHP3,
John

jasteele12
 
Shotster replied on at Permalink Reply
Shotster
Is what correct?

As for the short tags, I've noticed that the official release in branches/releases/5.4.0 does not have them, while the version in trunk/web does.

-Steve
andrew replied on at Permalink Reply
andrew
Yep. We run c5 through a filter before we post an official version. Add-on developers will have to be a little careful with the way they output XML string, but other than that it seems to work well – and plus, it allows us to be lazy and type <? and <?=, which is a total bonus.
Fernandos replied on at Permalink Reply
Fernandos
haha :P Andrew, sir you're just cool^
ellisgl replied on at Permalink Reply
I stay away from short tags. Disabling it in your PHP config can give a tiny boost in performance.
jasteele12 replied on at Permalink Reply
jasteele12
I completely agree, since I did a lot of XML development back in the PHP3 days. Now most hosts have short-tags disabled anyway.

If typing a few characters make a difference you can get an editor and type <?=-Tab and have it expand it.

I'd hate to see the diff ran on release vs trunk :)
pdg4concrete replied on at Permalink Reply
6 Mar, 2012 - Downloaded 5.5.1 through download link here @C5 site; from the half dozen files I have looked at so far, not using any short tags. Hand-jamming PHP for years, I see this continued practice as "amateur" to put it as politely as possible.

An .htaccess file with a simple "php_flag short_open_tag On" entry would make the C5 code much more "up-to-date", slightly boost performance and make the code smaller, all with a single file around 26 bytes.

"code that is not there is ultra-fast and never breaks"

I've heard stories of some hosts preventing .htaccess file use, but in this age of competition, smarter system admins, and the inevitable "customer that wants to control everything" those certainly have become few and far between.

Speaking of root files, a robots files wouldn't be a bad idea either...
jasteele12 replied on at Permalink Reply
jasteele12
I think you might have missed the point of short tags being used in development, and Andrew's post above about running that through a filter before posting an official release.

I still see the short tags as a disadvantage since diff is such a great tool (especially during development).

There is a robots.txt in the releases, and not all hosts are Apache based...