Page 2 of 3

Posted: Mon Jul 10, 2006 4:59 pm
by MrPotatoes
the reason i don't use PHP is because it's really ugly. secondly is why you stated. most of the designers look at me like a deer caught in the head lights when i talk about code. so to make thier lives easier as well as mine i use an engine/class for that :D

Posted: Mon Jul 10, 2006 5:23 pm
by Roja
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.
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.

Move away from using them. Doing so will ensure your bad coding won't be obvious in the future. ;)
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.
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.

The Memory statement is always correct, however. ;)

Posted: Mon Jul 10, 2006 6:07 pm
by Gambler
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.

Posted: Mon Jul 10, 2006 6:18 pm
by alvinphp
Roja wrote:
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.
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.
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.

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).

Posted: Mon Jul 10, 2006 7:03 pm
by Roja
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.
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.

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.
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.
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: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).
You *do* have to worry about it. You know it will not be possible to support, and sites will stop offering PHP4 eventually.

Code defensively. Get ahead of the game.
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.
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.

Posted: Mon Jul 10, 2006 7:39 pm
by alvinphp
First off you need to chill out a little and not take this so personal.
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.
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:There are also plenty of public hosting companies that do not support PHP4. Dotgeek doesn't, and they aren't the only ones.
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?

PHP 4 is going to stay for a long time just like ASP is still offered in windows hosting packages.

Posted: Mon Jul 10, 2006 8:21 pm
by Weirdan
By removing dozens of legacy #ifdef statements that slow down processing and parsing
#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 ;)

Posted: Mon Jul 10, 2006 11:03 pm
by Roja
alvinphp wrote:First off you need to chill out a little and not take this so personal.
I wasn't taking it personally.
alvinphp wrote:
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.
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.
Sorry! I honestly thought I included it: http://www.nexen.net/chiffres_cles/phpv ... y_2006.php

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.
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?
That was a sample to disprove your statement that none do - not the same as proving that plenty do not support PHP4.

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.
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?
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:PHP 4 is going to stay for a long time just like ASP is still offered in windows hosting packages.
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).
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
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).

Posted: Mon Jul 10, 2006 11:19 pm
by Luke
I remember this one time I argued with Roja... don't remember what it was about, but I'm pretty sure he smoked me.

Posted: Mon Jul 10, 2006 11:56 pm
by RobertGonzalez
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 :twisted: .

Posted: Tue Jul 11, 2006 12:01 am
by Roja
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.
I don't always win my arguments, and I'm not always right (the two aren't the same either :P ).
Everah wrote:It does make for some good entertainment though :twisted: .
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.

Posted: Tue Jul 11, 2006 12:23 am
by RobertGonzalez
Roja wrote:I don't always win my arguments, and I'm not always right (the two aren't the same either :P ).
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. :wink:
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.
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. :D

Posted: Tue Jul 11, 2006 1:54 am
by AKA Panama Jack
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 :twisted: .
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. ;)

Posted: Tue Jul 11, 2006 1:57 am
by AKA Panama Jack
Everah wrote:
Roja wrote:I don't always win my arguments, and I'm not always right (the two aren't the same either :P ).
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. :wink:
Sorry but I just have to mention this... :)

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."

:D

Sorry, just too good to pass up. :twisted:

Posted: Tue Jul 11, 2006 2:08 am
by RobertGonzalez
Tsk, Tsk. You're likely to cause another 'deplore 'em in the forum' showdown between AKAPJ and Roja. That was almost too much for me to handle last time. 8O