What do you use for templating?
Moderator: General Moderators
- MrPotatoes
- Forum Regular
- Posts: 617
- Joined: Wed May 24, 2006 6:42 am
Get ready for a shock - PHP6 doesn't have them - at all. Not as an option even. So it won't be about hosting companies disabling them, it will be about PHP6 not supporting them.alvinphp wrote:I have yet to see a public hosting company disable <?= ?>. And that includes newer versions of PHP. If you did disable the short tag a lot of legacy PHP and scripts would crash.
Move away from using them. Doing so will ensure your bad coding won't be obvious in the future.
When comparing, make sure to include all the gotchas. Without using output buffering, Smarty can be *faster* than raw php because it precompiles, and provides caching. Granted, PHP can catch up by using OB_*, but saying that PHP is faster than Smarty isn't always accurate.d11wtq wrote:IMO, PHP provides all the constructs and more than you need to manage templating. Doing it this way reduces memory, increases speed and lets PHP do what it does well.
The Memory statement is always correct, however.
PHP 5 has been out for over 2 years and I doubt you can find one public hosting company that does not support PHP 4 and 99% of those hosts do not support PHP 5. The very few that do support PHP 5 require you to use the .php5 extension. PHP 6 is going to be the same way because a hosting company is not going to require their clients to upgrade their scripts.Roja wrote:Get ready for a shock - PHP6 doesn't have them - at all. Not as an option even. So it won't be about hosting companies disabling them, it will be about PHP6 not supporting them.alvinphp wrote:I have yet to see a public hosting company disable <?= ?>. And that includes newer versions of PHP. If you did disable the short tag a lot of legacy PHP and scripts would crash.
Granted, you should still use <?php as it is the right way to do it and if you were ever to upgrade your site to PHP 6 then it will be one less thing to worry about. My only point was that if you have <?= ?> in your code now you shouldn't have to worry about this not working later on (at least on public hosts).
Both are rectal approximations, and they are wrong.alvinphp wrote:PHP 5 has been out for over 2 years and I doubt you can find one public hosting company that does not support PHP 4 and 99% of those hosts do not support PHP 5.
The number of hosts (out of 15 million surveyed - there are likely more) is currently 8%, and the growth is increasing month-over-month.
There are also plenty of public hosting companies that do not support PHP4. Dotgeek doesn't, and they aren't the only ones. Of course, that number will go from <10% to 100% shortly after PHP stops supporting PHP4 with security fixes and updates. Granted, there hasn't been a discussion of that yet, but it will "trigger the apocalypse" of change.
Until then, the Siren call that will lead hosting companies to PHP6 instead of PHP4/5 will be that 6 offers a built-in compiler, reducing overhead and increasing performance for customers SUBSTANTIALLY. Not to mention security improvements, new functionality, and more.
Not true either. My host doesn't require .php5, it lets me use .php. It offers clients two different servers - one running php4, one running php5. Their goal is to increase the number of users on the php5 side, and reduce the users on the php4 side.alvinphp wrote:The very few that do support PHP 5 require you to use the .php5 extension. PHP 6 is going to be the same way because a hosting company is not going to require their clients to upgrade their scripts.
You *do* have to worry about it. You know it will not be possible to support, and sites will stop offering PHP4 eventually.alvinphp wrote:Granted, you should still use <?php as it is the right way to do it and if you were ever to upgrade your site to PHP 6 then it will be one less thing to worry about. My only point was that if you have <?= ?> in your code now you shouldn't have to worry about this not working later on (at least on public hosts).
Code defensively. Get ahead of the game.
More features, not less. Full unicode support, built-in caching and compiling, reduced security issues (built-in input filter), and more. All of those add performance hits, that have to be offset. How? By removing dozens of legacy #ifdef statements that slow down processing and parsing. Thats a great thing. If you think otherwise, feel free to keep running php4/5 until the wheels fall off, or until you write your own language.Gambler wrote:Short tags deprecated? Great. Even less features, even more typing. Even more "consistency" which breaks scripts. Now I need to write my own template engine, which will replace all that bloated crap. Design by committee rocks.
First off you need to chill out a little and not take this so personal.
PHP 4 is going to stay for a long time just like ASP is still offered in windows hosting packages.
I am wrong? Please link me the survey where 8% of the 15 million 'web hosting companies' are on PHP 5 AND do not support PHP 4.Roja wrote:Both are rectal approximations, and they are wrong. The number of hosts (out of 15 million surveyed - there are likely more) is currently 8%, and the growth is increasing month-over-month.
Your evidence that 'plenty' of hosting companies do not support PHP 4 is an obscure hosting site that says it is in beta? Now you are making a rectal approximation. You really believe a hosting company with 20k clients is going to tell all their customers they are going to disable PHP 4 when they can just run both 4 and 6?Roja wrote:There are also plenty of public hosting companies that do not support PHP4. Dotgeek doesn't, and they aren't the only ones.
PHP 4 is going to stay for a long time just like ASP is still offered in windows hosting packages.
I wasn't taking it personally.alvinphp wrote:First off you need to chill out a little and not take this so personal.
Sorry! I honestly thought I included it: http://www.nexen.net/chiffres_cles/phpv ... y_2006.phpalvinphp wrote:I am wrong? Please link me the survey where 8% of the 15 million 'web hosting companies' are on PHP 5 AND do not support PHP 4.Roja wrote:Both are rectal approximations, and they are wrong. The number of hosts (out of 15 million surveyed - there are likely more) is currently 8%, and the growth is increasing month-over-month.
But I never said the 8% on PHP5 also did not support PHP4.
You made two points: 99% of hosts do not support PHP5 (its 8%), and I can't find one public hosting company that does not support PHP4 - I did (Dotgeek).
Disproving both. There are more examples of the latter, and there are more than a few that fit both categories.
That was a sample to disprove your statement that none do - not the same as proving that plenty do not support PHP4.alvinphp wrote:Your evidence that 'plenty' of hosting companies do not support PHP 4 is an obscure hosting site that says it is in beta?
My evidence to that new argument is that in fact, every major Linux distro's current release is running PHP5. As a result, a number of hosting companies (keep in mind that there are millions!) are running the base OS with few customizations - resulting in a non-trivial number of hosts offering PHP5, and not PHP4.
Please note that dotgeek has thousands of customers, and is labelled as "beta" precisely because they cater to first adopters, and have for several years now. They are not at all 'obscure'. They are very well known. For perspective, they have a higher google PR rating than these forums do.alvinphp wrote:Now you are making a rectal approximation. You really believe a hosting company with 20k clients is going to tell all their customers they are going to disable PHP 4 when they can just run both 4 and 6?
I give it less than 2 years. ASP, on the other hand, will continue as long as Microsoft offers security fixes for it (for a totally different set of reasons).alvinphp wrote:PHP 4 is going to stay for a long time just like ASP is still offered in windows hosting packages.
Yeah, the ifdefs are problematic for coding & maintenance - the parsers, however, are also slowed down thanks to dozens of code paths for every possible tag type. Eliminating one is a net win for performance AND development (on the PHP language side primarily, but also for developers overall).Weirdan wrote:#ifdef's are slowing down the compilation of php itself, they do not decrease the performance of compiled php interpreter. The code inside them does though
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
I don't always win my arguments, and I'm not always right (the two aren't the same eitherEverah wrote:Yeah, I was just thinking that. How long does it take a person to realize that arguing with Roja is like swallowing a hand grenade. The argument will eventually end, but the outcome will not be nearly as pretty for you as it is for him.
heh. well, I hope everyone takes it that light-heartedly. With possibly two specific exceptions (*), I'm almost always grinning when I post "arguments" on this forum.Everah wrote:It does make for some good entertainment though.
* - No, I'm not saying who. That would be flamebait, unjustified, and rude.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Let's see... been here for three years... read through many of your 'volleys' with other poster... in the end, it seems that you always have the last word and that the other poster is either convinced into submission or simply gives up out of sheer lack of ammunition.Roja wrote:I don't always win my arguments, and I'm not always right (the two aren't the same either).
I am always grinning when I read your posts. Mostly because I am wanting to see what the sorry sack who tries to answer you is gonna get from you in response, but also because you always, and I mean always, back up what you post. I didn't think it was possible. But you make it so darned entertaining that even if I am horrified by the potential lambasting the other guy is gonna get, I can never look away.Roja wrote:heh. well, I hope everyone takes it that light-heartedly. With possibly two specific exceptions (*), I'm almost always grinning when I post "arguments" on this forum.
* - No, I'm not saying who. That would be flamebait, unjustified, and rude.
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
Actually he tends to make himself look silly half the time so it is a tossup when talking to him. Half the time he smokes himself.Everah wrote:Yeah, I was just thinking that. How long does it take a person to realize that arguing with Roja is like swallowing a hand grenade. The argument will eventually end, but the outcome will not be nearly as pretty for you as it is for him.
It does make for some good entertainment though.
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
Sorry but I just have to mention this...Everah wrote:Let's see... been here for three years... read through many of your 'volleys' with other poster... in the end, it seems that you always have the last word and that the other poster is either convinced into submission or simply gives up out of sheer lack of ammunition.Roja wrote:I don't always win my arguments, and I'm not always right (the two aren't the same either).
![]()
Most people usually stop arguing with Roja not because he is right but because they finally realise...
"Don't argue with an idiot. They will bring you down to their level and beat you with experience."
Sorry, just too good to pass up.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA