Which version of PHP do you have actively installed?
Submitted by trollll on Wed 12 Jul 2006
| PHP 3 |
![]() 0% | 5 votes |
| PHP 4 |
![]() 39% | 404 votes |
| PHP 5 |
![]() 37% | 381 votes |
| PHP 6 (living on the edge) |
![]() 2% | 23 votes |
| No PHP! |
![]() 19% | 203 votes |
| Total 1016 votes |
When I first got into PHP years ago I couldn't understand why people were still using version 3 when 4 was out and stable, now I understand. The PHP devs just make too many minor changes here and there for it to be a painless upgrade.
[ Parent ]
Luckily, since only Horde and my own code goes on the home server, I could stick with PHP5 when switching from having sites hosted all over the place.
[ Parent ]
[ Send Message | View Steve's Scratchpad | View Weblogs ]
It seems like PHP defaults and basic language features change even in minor version increments these days - and when you consider extensions too compatability in PHP is a hard thing.
Two "identical" PHP installations can easily have difficulty running the same script, just another reason to avoid PHP as far as I can see ;)
[ Parent ]
Most of the applications we do have are things like forums, and these have been upgraded for security reasons, and the upgrades usually also included PHP5 compatibility. Whilst I understand the pressures not to upgrade, for an ISP it is pretty much essential to offer PHP5 these days.
I'm guessing in a company situation there is inhouse code that needs updating to match current standards, it is worth explaining to management that they need to budget for "software decay", just as they would any other item. Otherwise you end up where the banks were for the millennium bug, with shed loads of code maintenance and no one with the skills to do it. It isn't that standing still isn't an option, but it has different cost implications "cheap now"/"expensive later". Sometime running stuff into the ground is the right maintenance choice for a business, but you should be doing it knowingly.
The more I learn of PHP, the more I'm glad most of our website code is in Perl. Although the same issues apply, and embedded Perl got more security conscious with one upgrade, although most of our code is using templates and not embedded Perl.
[ Parent ]
"Most of the applications we do have are things like forums, and these have been upgraded for security reasons, and the upgrades usually also included PHP5 compatibility. Whilst I understand the pressures not to upgrade, for an ISP it is pretty much essential to offer PHP5 these days."
Interesting you would write this, as I've largely found the opposite of both those statements. Most web applications I would like to run completely lack any ability to run in PHP5 due to relying on several of the deprecated features of PHP4. Also, the way they handle references break completely in PHP4.4 as well.
As far as services offering PHP5, I've largely found that only services aimed at the developer community offer PHP5. Most of the mainstream hosting companies I've seen have a fear of upgrading - and rightly so, since it would break a lot of their customers' sites.
It actually confuses and concerns me that they've even started the PHP6 branch at this point, given the work that needs to get done on the PHP5 branch and the slow adoption rate.
"The more I learn of PHP, the more I'm glad most of our website code is in Perl. Although the same issues apply, and embedded Perl got more security conscious with one upgrade, although most of our code is using templates and not embedded Perl."
I definitely think that people code in PHP for one of two reasons:
- Scripting needed and most find PHP easier to pick up than the alternatives, or
- You prefer PHP to the alternatives even though you can list off more of its shortcomings than PHP-haters
I put myself in the latter category, though python has started looking better and better...
[ Parent ]
I once thought this was rather restrictive, since, although I'm a perl hacker, and it's my most fluent language, I've begun to doubt it's utility as a web scripting language in favor of php for most things (although Mason still beckons to me). Now, I've been looking at Rails and I'm thinking maybe it's good that I'm not restricted to only perl, only php, only whatever. Thankfully, I'm pretty sure I can convince my superiors to let me use almost anything if it runs on Apache, and I can get it to run on debian. Wish me luck :).
[ Parent ]
"Thankfully, I'm pretty sure I can convince my superiors to let me use almost anything if it runs on Apache, and I can get it to run on debian."
[ Parent ]
I should have mentioned the most important part of that equation -- my desire to use the technology :).
[ Parent ]
[ Send Message | View Steve's Scratchpad | View Weblogs ]
although I'm a perl hacker, and it's my most fluent language, I've begun to doubt it's utility as a web scripting language in favor of php for most things
Without wanting to get into a language war .. why do you doubt perl is a good web scripting language?
[ Parent ]
As a web scripting language, I think it ends up being too slow, and doesn't scale well unless you move to mod_perl, and even then it doesn't lend itself to common web devlopment needs like sessions or templating without a lot of extra effort that isn't required with php, for example.
I've used Perl in software, web apps, desktop apps(unix and windows). Don't get me wrong, perl makes easy things easy without making hard things impossible -- I drink the koolaid!, but it seems that php(since I first encountered it, php3) has made great strides in becoming an out of the box answer for web scripting that perl was never intended to be. If I'm to have more than 1 tool on my belt, php is going to be the one I go to first for web scripting.
[ Parent ]
[ Send Message | View Steve's Scratchpad | View Weblogs ]
I guess thats a fair assessment. Although there are many modules available to easily setup templates, and sessions, it is true that you have to wire them in yourself. Its been said a lot before but I think one of the reasons that Perl wins so often for me is that there are a lot of modules available for different tasks.
For example this site makes use of HTML::Template to manage the page templates and produce all the different output pages. I also use CGI::Session to store all session data in a database.
With regard to scalability you're probably right. I know that this site sometimes suffers because it is a CGI and converting to mod_perl is something I just don't want to attempt - still with sensible caching of database data, and caching of output pages it manages to hold together enough.
Still I find that in terms of development perl scales nicely because it is easy to seperate out content and logic into self-contained modules. Something that many PHP users just don't do. I know that PHP5 has support for classes, & etc, but I've seen an awful lot of projects which intermix HTML + PHP in single source files - and that style of development doesn't scale. (Using smarty, or some other templating system, always helps there!)
[ Parent ]
[ Parent ]
[ Parent ]
At my home I'm using Ruby scripts to generate the HTML pages of my small web site.
[ Parent ]
I realize that it's easy to get started in PHP, but once you're there, you're stuck. Do you really want every programming project to be a web site with a MySQL backend?
[ Parent ]
I don't see PHP as really all that limiting at this point (though honestly I would rather use Python at this point). But I do see developers go through the following sort of thought process:
1. Learn basics
2. ...practice more basics
3. Go to 1 or continue
4. ...
5. ...
6. Burst through to the other side and make PHP work for you in a way that makes web applications extensible, flexible, scalable, and manageable.
I think 90% of PHP coders never make it past step 4.
[ Parent ]

0%