On PHP

PHP.net has announced that they will stop development of PHP4 at the end of this year, and end security updates on 2008-08. (In 2007, their site still doesn’t have obvious permalinks. They do have a RSS 1.0 feed though, remember those?)

PHP 4.0 was release in May of 2000, by 2004 when the first version of PHP 5.0 was released, PHP 4 had achieved complete dominance and was completely ubiquitous in both script and hosting support.

Fast forward 3 more years and PHP 5 has been, from an adoption point of view, a complete flop. Most estimates place it in the single-digit percentages or at best the low teens, mostly gassed by marginal frameworks. Even hosted PHP-powered services who have no shared host compatibility concerns like 30boxes, Digg, Flickr, and WordPress.com, have been slow to move and when they do it will probably be because of speed or security, not features.

Some app makers felt sorry for PHP 5 and decided to create the world’s ugliest advocacy site and turn their apps in to protest pieces at the expense of their users. (Hat tip: Mark J.) They say “Web hosts cannot upgrade their servers to PHP 5 without making it impossible for their users to run PHP 4-targeted web apps” ignoring the fact that there isn’t a released PHP app today that isn’t PHP 5-compatible and recent upgrade issues have been caused by PHP itself in point releases. (See WP#3354.) It’s easy to always promote the newest thing, but why, and is it for us or our users?

Now the PHP core team seems to have decided that the boost their failing product needs is to kill off their successful one instead of asking the hard questions: What was it that made PHP 4 so successful? What are we doing to emphasize those strengths? Why wasn’t PHP 5 compelling to that same audience? Are the things we’re doing in PHP 6 crucial to our core audience or simply “good” language problems to solve? Will they drive adoption? How can we avoid releasing (another) PCjr?

I wonder if PHP 5+ should be called something other than PHP. A unique name would have allowed the effort to stand on its own, and not imply something that’s an upgrade from what came before when in many cases it’s just different, not better, from an end-user perspective. Continue to maintain PHP 4 as like a PHP-lite. Make it harder, better, faster, stronger.

Really good points about php 6 and solving the “good language problems”. only thing I’ve really seen come out of php5 adoption is code that can be harder to understand. I think what has made php successful is its ability to be easy and comprehensible.

I’m interested in knowing just what features in php 5 + really are going to matter to the majority of people out there who use it; those people and hosts who are responsible for making it so popular in the first place. It’s not popular because it has namespaces (one of those “good” language problems) or some overrated framework (like RoR). Whose is going to be using these new features? How does it really make the overall experience of using php better?

I think PHP totally failed is why there is such a slow adoption of the latest versions. Instead of making the experience better for a majority of their users, they catered to the vocal 5% and instead made a language that crippled itself.

@kenrick
While I understand the frustration, your statement ‘code that can be harder to understand’ doesn’t make any sense. Are you referring to OOP? If so – I would have to disagree. I don’t see how having better code structure (versus procedural code soup) makes things harder?

I think where PHP failed was it’s low barrier to entry and the hacks and horrible scripts that now litter the Internet.

I think you make some great points here, Matt. There’s a lot of FUD going on for something that will more-or-less just work with current setups. Sure there will be a bit of a learning curve for those of us – alright, most of us – who haven’t taken the plunge yet, but isn’t there *always* a learning curve when it comes to a new product?

The ultimate measure of an app (or language) should be its usage over time in a free market.

While, all things being equal, anyone would pick something that didn’t have “hacks” over something that did, but success is driven by the end-user experience, which is strongly influenced by the speed, security, and extensibility of the underlying code, but not beholden to any particular coding style, method, or aesthetics.

It’s easy to say something sucks, but if you don’t understand why something has succeeded in spite of sucking you will never be able to create something better.

It sounds like Nate’s concern is there’s a low barrier of entry, people with relatively poor programming skills will be able to code. This can lead to programs with poorly done, buggy, and/or unreadable code. It’s not a problem if nobody else has to look at or maintain awful code. But that’s not always the case. (This was a common complaint about Visual Basic 6 as well.)

That having been said, I don’t mind a language “everyone” can learn. Who knows if an otherwise skilled or interested person may have been turned away by a difficult language?

Maybe other systems who signed up for the GoPHP5 effort you link to have different needs?

Maybe they need to integrate the very web services your mentioned web 2.0 companies build for the community?

Maybe they intend to easily support higher end databases with proper native database support, instead of reinventing the wheel completely in PHP userspace?

It is understandable if WordPress is not going into these directions, and intends to keep being a self-contained blog system, but asserting that others would not benefit from the expanded feature set by extrapolating from your local needs is quite misguided.

The problem of PHP 4 is its own success. Its so big of a success that it is hard to get people to the (sometimes incompatible) next generation versions. It is definitely the apps working with PHP 4 that drive people to use PHP 4, not PHP 4 itself. If crucial apps, like phpMyAdmin were developed for some other technology at their time, then that would become the de-facto everywhere installed programming environment to work with.

Now with the real successes, like phpMyAdmin and Gallery moving to the PHP 5.2 platform, PHP 4 becomes much less appealing. As you have said, it is not the language, but what is made with them, that makes it interesting.

I understand that WordPress is not committed to the GoPHP5 effort, and I have read your comments on wp-hackers, that you instead advise developers to implement importers for similar class web applications. But WordPress might not be enough to keep PHP 4 interesting if the other players are moving ahead.

“But WordPress might not be enough to keep PHP 4 interesting if the other players are moving ahead.”

WordPress works just as well with PHP 5 as 4, and there are no features on the roadmap (including ones on your list) that would require PHP 5. The only reason for us to break PHP 4 compatibility would be political, and our users without the ability to upgrade their server would be the ones who lose. WordPress doesn’t make PHP 4 interesting or not, it’s agnostic.

FWIW, we switched to PHP5 at Technorati and it’s been an almost universially Good Thing. Our transition towards PHP5 idioms has been slow, but each step has been beneficial to us. Our code is smaller, faster and more flexible than before. And we get to use nice things like fast json integration.

I think I see what Nate is saying, more about the fact that there are so many scripts and what-not out there, which are bolted together, scripts that people rely on but may not have a clue how to edit. Many of these will break if hosts switch to PHP5, and they’ll end up with so many support calls asking them why it’ll cripple them.

There’s no real demand from the user base to upgrade, that’s what it’s not happened. PHP5 should have been, first and foremost, backwards compatible. People need time to migrate.

The option to run 4 and 5 at the same time and just select which version in a script would probably be enough, so we can all transition at our own pace.

If the majority of script break when PHP5 is installed, hosts won’t dare do so, even if support is dropped.

It probably needs a big app that only runs on PHP5 to cause the uproar needed to force hosts to upgrade. Make WordPress 2.3 PHP5 only?

“It probably needs a big app that only runs on PHP5 to cause the uproar needed to force hosts to upgrade. Make WordPress 2.3 PHP5 only?”

Yes that’s the theory behind the gophp5 site, but to me it seems fundamentally disrespectful to users who are simply caught in the crossfire of a political power move their neither know or care about. PHP core has never shown any particular regard for its biggest apps, as evidenced by the above bug and others, so I’m not sure why we should go out of our way to promote their upgrade. PHP 6 sounds much more compelling.

And even WordPress has the same problem with 2.0 vs the current 2.2 (and speaking a little further the future 2.3), setting and a EOL its not a solution to make people move to updated versions (and neither make campaigns in pro of moving to x-release), the solution is like matts says its to provide a better features, keep innovating that in a long-way-time to see will make people move up to major releases.

None of the most requested features for WordPress would be any easier (or harder) if they were written for PHP 4 or 5 or Python. They’d just be different.

Even if it would make things moderately easier for us (and I think it probably would), we’re not Technorati with a controlled environment. PHP5 penetration right now is so horrible (and our user base so large) that even a dramatically better PHP5-WordPress wouldn’t be the responsible choice — it’d leave hundreds of thousands of blogs up the creek. We don’t need to prove zero gain in order to justify our position.

I don’t care what’s under the hood, most of the time, as long as it works. If I have a site set up that needs php 4, then I just don’t bother with anything that requires 5. People like me are just lucky that hosting sevices like dreamhost make installing what we want easy. They have php5 apps clearly marked so there’s no confusion.

I know some programming, but not php. I’ve been thinking about learning it thanks to WordPress. You guys do a great job on that. It’s not too hard to figure out what’s going on if I do need to look at the code.

Having looked over about 20% of the WordPress code, I can say it would benefit with wide support of PHP 5 features. Classes with Iterator support would make handling categories an object with methods instead of functions.

While the coding design of WordPress is superb, I would say it wouldn’t be difficult to also support Iterators and other SPL classes. There are new and great extensions being added to PHP 5 that shouldn’t be looked over (JSON, HTTP, mysqlnd for mysqli, PDO, DOM (although the PHP 4 XMLDOM has improved a lot since 4.3), as well as minor and major improvements and additions of functions to PHP 5.

While, I can develop in PHP 4 if I have to, I’ve found some complex things in PHP 4 are extremely easy in PHP 5.

Also realize that a lot of the WordPress code uses Globals, when it could use a class with Static properties instead. I’ve known a few people who found some code (that uses Globals) difficult, since the variable wasn’t in the file or declared in the function.

The only application that I’ve worked with recently that would benefit from either WordPress design or a complete overhaul to PHP 5 was Coppermine (but I think that they should also branch from phpBB 3). They have been working on converting main application code to functions and classes, but it seems slow and is currently not as easy to crack as WordPress.

I’ve been wondering why people are so slow to upgrade to 5. Yeah the initial releases were slow and buggy but it’s turned into a really nice language IMO. I built the JPG Magazine site on 5.1.6 and it’s been fantastic. Especially the XML support and better object model. And as far as speed goes I haven’t seen anything to really make me think it’s slower at all. Maybe 4 was just faster running crappy code 😉 Anyway I’m not going to miss PHP 4 at all. I’ve been working exclusively in 5 for well over a year and am happy as can be.

Users just need something that works, be it PHP4 or 5 or Perl or whatever. But as a PHP developers, I don’t think there’s a need to target any of the major versions unless you have a version-specific need. I think it would be irresponsible to make your app break in PHP4 just because you agree with the political aspect of its discontinuation.

Let the php.net/zend guys killl PHP4 as they planned, and let’s continue building better apps as the market dictates. =)

I like PHP 5. I think that it could bring WordPress code closer to the ‘code is poetry’ ideal. But I agree that WordPress can only follow a shift to PHP 5 – even if it should still jump at the right time. WordPress is really locked into PHP 4 because the vast majority of the userbase only has access to 4.

I think every language reaches a point in its development where it’s “good enough” – and it becomes popular. Advancing the language after that is often a matter strictly for the hardcore programmers and academics, and the versions they create after that point are rarely widely adopted.

I’m not sure what the solution is, but app developers shooting themselves in the foot is unlikely to be it.

Personally I’ve avoided upgrading to PHP5 mostly because PHP4 is “good enough” and runs the apps I need (and the ones I wrote myself). I guess I’ll eventually be dragged into the upgrade kicking and screaming like I was with Apache 2.0. And MySQL 5. And Perl 5 and 6. And…

From a programmer’s viewpoint, PHP5.2 is far superior even if you do not touch any OOP features. Modern techniques are much better supported with SimpleXML and JSON. The reason why people have not moved is simple — it’s easier to stay put.

PHP4 is the /bin/sh of the web – ubiquitous, reliable, predictable, and easy.

I jumped on the PHP bandwagon in 2000, right about when PHP4 was released, and I see no reason to upgrade to 5+ anytime soon. When I need a “real” language, I generally turn to Python, but that’s not the role that PHP fills for me. My impression of the Go-PHP5 effort (and PHP5 in general) is that it’s a project motivated by emotional considerations masquerading as technical ones.

I’m sure a lot of people felt the same way about ending support for php 3 but the php team has to keep moving foward. They have to continue to enhance the language to attract new developers. There are a lot of Java and C++ developers who grew up on OO concepts and aren’t going to go “backwards” into a non-OO language. Moving the language forward isn’t just about finding good language problems to solve it is about keeping php competitive and attractive to developers.

I don’t understand what all the fuss is about. The slow uptake of PHP5 is due to host and developer laziness and has nothing to do with PHP4 being somehow “better”. There’s really very little difference between the two versions, besides PHP5’s vastly improved OOP and DOM support.

Do you still provide support for WordPress 1.x or kindly suggest an upgrade as soon as possible? The core PHP developers are committed which improvements on PHP5 and the development of PHP6, and porting things to PHP4, when not impossible, is time consuming. If there were a group of developers interested to continue maintaining PHP4, they could do so. There aren’t. They want to move on, as nobody wants to support WP 1.x anymore. And they are giving a lot of time for people to upgrade. Anyway, anyone can still use PHP4 forever – it won’t disappear on 08/08/08, it’ll only be discontinued, and for a good cause. 🙂

ps: forget the “good cause”. it can be a good one for some, a bad one for others. my point is that PHP4 won’t disappear anyway; and the reason for the discontinuation is that PHP core developers want to move on. there aren’t enough people interested to maintain a version while there’s a much interesting one floating around for a while – and this is also valid for WP 1.x / 2.x, I bet, thus I used it as an example.

Rodrigo, we have committed to supporting WordPress 2.0 until 2010. Still, we’re a blogging app, not a programming language and it’s not entirely analogous. As for the later versions, our strategy to get people to upgrade is by removing as much friction as possible (maintaining backward compatibility) and providing compelling new features.

I think most people agree that PHP 6 is promising some compelling new features, but in 5, at least for me, there aren’t any killer features. Some people on this thread disagree.

I worked for a company that had a 1/2 million line e-commerce application written in PHP4 which originally started out as PHP3. It took roughly half a day to sort out the kinks and it was up and running on PHP5 with no problems.

As for performance? Negligible to slight improvements mostly. However had a full port (ie: using the better PHP5 XML libraries) been done, hours could have been shaved off some of the batch processing work that had to be done.

So basically, getting things compatible shouldn’t change anything, its when you start to take advantage of PHP5 that you start to see the benefits.

I disagree with all the protest over “catching users in the crossfire.” Yes, users don’t care, but that’s never been a respectable position to take with issues like global warming, voting, and free software in general.

Make the users care. That’s what GoPHP5 is about. The developers for these projects are generally unpaid. They’re under no obligation to please every user. Enabling use of PHP 5.2 features is critical to ending years of self-censored development.

“PHP may finally be growing up but it’s like taking a rebellious child who hasn’t been disciplined in years and sending him to bootcamp. He’ll have to be dragged kicking and screaming obscenities but hopefully the result will be worth it.”

It’s tough to draw a line in the sand when you don’t have consensus in your user base. I can sympathize with their position in some ways but as a user it’s not a decision that will make me take my PHP4 application and move it to PHP5.x.

We developed a CMS + shopping cart system that works well together and is a complete solution. We started doing custom development jobs in Python (Django) a year ago because it felt like a better language and solution. I had held out hope that PHP6 would address name spaces, better object model, and have a killer feature (or minor) or two that would make the transition a obvious one.

I really thought that maybe we could ignore PHP5 for the time being until a better solution came out and hopefully that was going to be PHP6. Instead we will rewrite our application in Python which will provider better stability, better language constructs, and a better framework.

@nate
“If so – I would have to disagree. I don’t see how having better code structure (versus procedural code soup) makes things harder?”

Just because something is written as OOP doesnt automatically mean its not code soup. You don’t have to google very far for poorly written php5 code.

Look, besides a new object model that got faster because of a whole new underlying Zend engine, all the other cool stuff in PHP are procedural functions like the json stuff mentioned up above.

Just because now you have __contruct, __get, __set and other magic methods doesn’t mean your programming is suddenly going to become better, in fact, it might even make it harder to follow along with your ‘superb php 5’ program, where because before if something said $this-my_function() you could look in its class for that function and find it, whereas now with magic methods like say __call mean you have to go and find where that class is trying to call the object method. thats just one silly example but there are more things out there.

php iterators are cool, but they need more documentation and real world usage examples for them to catch on, and more PR from zend and other in how to best go about using them.

the wordpress codebase can be scary at times, but its a real world codebase, not a perfect world codebase, and sometimes thats they way things are. Just rewriting it to php 5 doesnt guarantee any speed ups or easier use. you have to remember that a majority of its users dont code at all, and im sorry, its just easier to explaing wp_list_categories() to people then the idea of a msyql result set and looping through an array, or even looping with an iterator.

My impression of the Go-PHP5 effort (and PHP5 in general) is that it’s a project motivated by emotional considerations masquerading as technical ones.

As a developer who works on large PHP projects, I know that we spend a good deal of time writing around PHP4 language limitations, as well as maintaining annoying ‘parallel codebases’ whenever we have to work with XML, JSON, and so on. In a world of web services and cross-site communication, SimpleXML and clean JSON support is reason enough to cheer for the upgrade. You don’t have to turn it into an OOP vs. Functional language war to see benefits.

The extra time we spend doing parallel implementations of those core functions is time that we could spend building new features, fixing bugs, testing, etc. Those are profoundly pragmatic considerations, not emotional ones, and other projects are in the same place. It’s clear that you don’t see a need for it in the project you work on, and that’s fine. Calling it an “emotionally-motivated” “political power play” just suggests that you don’t spend much time looking outside the backyard of your own codebase and its specific needs.

I never claimed to be an expert on every PHP project in the world, and I am most familiar with the backyard of the codebases I work with regularly.

In that experience, there is usually a compatible pure-PHP implementation for anything we’ve wanted to use an extension for. There are no parallel codebases, at worst there’s a function_exists sprinkled here and there. We also keep all those functions in the same spot, so when we change the minimum requirements we can easily drop things we don’t need anymore.

Like I said in the post none of the features our users say are most important are going to require PHP 5.

Anyway, thanks for sharing your experience which like several other people in this thread was different than mine. That’s what makes this conversation interesting. Obviously the features in PHP 5 are more than compelling for some folks, others like me are more excited about version 6 than 5, and some seem content how things are today.

Obviously the features in PHP 5 are more than compelling for some folks, others like me are more excited about version 6 than 5, and some seem content how things are today.

Indeed, 6 does seem like it solves quite a few additional problems. I’d love to see it be adopted rapidly… I think concerns that PHP4 would reign forever — blocking not just 5, but 6 adoption — contributed to the GoPHP5 project’s genesis…

I think you are overlooking something very basic here. Imagine if you rolled out a new release of WordPress 3.0 and the majority of the hosting firms do not feel it is worth upgrading so they still remain on 2.x. Subsequently you rolled out WordPress 3.1 and 3.2 and yet the majority of the hosting firms still remain on 2.x, how would you feel?

You may think this example is silly, however, this is what in effect you are sending out to the PHP development team, I cannot see any compelling reason to move to PHP 5 thus I am going to continue to stay in the past and keep my codebase to only support PHP 4.

Yes PHP 5 may not been the killer release and yes it had some concerns in the past but it is about moving on and living in the past is not where we want to be and lets face it, PHP 5 does have some nice new features to play with.

We should be setting an example of moving on, not setting an example of how we are still developing in the past.

“You don’t have to turn it into an OOP vs. Functional language war to see benefits.”

I don’t see any functional languages being discussed here. Simply having functions in your language does not make it a “functional” language. Perhaps you mean imperative or procedural. There’s nothing special about OO, it’s just a complex datatype, and it can appear in both functional and imperative programming languages.

For my co-developer and I, we are getting rid of PHP all together. Every time we go to do a security upgrade on our co-lo, we have to go back through and patch all of our portfolio pieces (shit that isn’t even being developed anymore) and fix all of the errors.

While I don’t think PHP5 is the silver bullet, as someone said earlier, WordPress could really benefit by adding some of the OOP features that PHP5 offers. Features such as interfaces and type hinting would make developing plugins much more robust, not to mention using PDO to harden the database interactions up and Iterators to abstract some of the data structures.

I don’t think things like these are so important if you are just building an application, however if people are seriously using WordPress as a platform, this sort of code structure would greatly assist people targeting it.

I don’t see any functional languages being discussed here. Simply having functions in your language does not make it a “functional” language. Perhaps you mean imperative or procedural.

You’re completely correct. I meant ‘procedural’ and braino’d as I was typing. 😉

Although a blogging package written in a functional language would be cool enough to install just for the geeky happy-points… heh.

There’s nothing special about OO, it’s just a complex datatype, and it can appear in both functional and imperative programming languages.

In theory, yes. But language features can implement some of the OO syntactical sugar, and helpful features like hiding of private data and code, for you. It’s possible to implement those OO features yourself in a procedural language, but it’s also painful.

Although, my point earlier was that the OOP features in PHP5 are only one of the reasons to value the upgrade; even ignoring OOP, it brings a lot of additional functionality to the table and that means less code for me to hand-roll.

Don’t forget that most of the web hosting providers still have PHP4 installed. I’m developing small and middle-scale web sites and applications and a 100% of the hosting services I’m using have installed PHP4. I know, I’m talking about shared hosting but still – I can’t force my web hosting provider to install PHP5 only because of me.

The EOL main point is that there are no human resources to keep maintaining PHP4. It is a bit too much to call this just “politics”; they are just proceeding with the usual development cycle: “We won’t fix bugs in version 1.x after 08/08/08”. Pretty reasonable, even more because they’re giving a lot of time for people to upgrade. Also people has the option to continue using php4 forever – it won’t disappear, will just be moved to the PHP museum.

There’s a better version around with things that can’t be easily ported to PHP4, when not impossible. And there’s a new one coming soon, so it’s not so difficult to understand that PHP4 *has* to be discontinued. Or maybe it’s just me.

1. Disbelief and denial
Initially the change is met with disbelief and denial. “It wonÂ´t happen to me.” “No, they wonÂ´t close the plant ““ theyÂ´ll find a way through the problems, they always have.” “If I just keep my head down, itÂ´ll be business as usual soon.”

2. Anger and blame
Next, it is common to see anger and blame. In workplace change at this time some employees will actively resist the changes saying things like: “Why should I change? Is this how they treat us after weÂ´ve worked our butts off?”

3. Reluctant Acceptance
As people work through their anger, they move to the third stage where they reluctantly begin to accept the changes and start to explore their role in it. YouÂ´ll hear things like: “ThereÂ´s just too much to do now ““ how am I going to get it all done?” “OK letÂ´s try it but whoÂ´s doing what now?” ” IÂ´ll never learn this new system ““ I need training.”

4. The final stage
When people commit to the change, they start focusing on the future instead of dwelling on the past. They have a clear sense of their roles and where they are going.

PHP5’s problem so to speak was that it was focused on providing tools for developers. PHP4 could already do everything that end users require today. That being said, more productive developers are also in the interest of end users and there lies the crux:http://www.pooteeweet.org/blog/787

@Samuel – to answer your question: because some of us dont get to choose our hosts.

For example, I work at a University. All of my web apps have to be hosted on the University web host. That environment runs RHE with PHP4. The host probably has 50,000 user accounts on it. And that number is the reason they (the box admins) cant upgrade to v5 of PHP.

There are TONS of scripts and small apps that have been written that are still in use, but where the authors have since moved on. The scripts just work, so no one thinks about them. If the environment were upgraded to v5, a big chunk of those scripts could suddenly stop working. The people who use them wont know why they have stopped working, and the University help desk will be flooded with calls. There is no owner to contact to upgrade the app, so since the IT Division “broke” it, most departments would expect the IT Division to “fix” it. And they just dont have the resources to do so.

The IT Division is working on correcting this problem. But when you have as many employees, departments, etc as we do, it just takes time.

Wow.. you really want to just keep using PHP4 forever? This is why developers get so excited about rails and other technologies. Its to avoid the dinosaurs like you so prevalant in the PHP community.

Its the groupthink mindset like yours that has kept PHP4 dominant for so long (when a better upgrade to the same technology exists). You are thinking about shortterm benefit, and not willing to invest any time in refactoring your crappy code to use the better constructs for the upgraded technology.

ASP.NET and many other technologies have the same problem. Developer time and motivation is valuable, and when you force them to use old crappy technologies because your too cheap and lazy to put in the upgrade costs, you’ll eventually pay way more in the long term.

jc, I have no plans to use PHP 4 forever, especially since they’re discontinuing support for next year. We test all of our code with PHP 5 and ensure compatibility, but all things being equal we don’t get a lot out of it.

I surprised the obvious hasn’t been stated: as developers, hosts, etc. analyze the burden of upgrading, they will be taking a look at some of the other platforms. This very well could be the end of the line for PHP as the P in LAMP.

Matt, I understand this is a rant, but frankly there’s still is the possibility to be fair. PHP is a programming language. The fact that it has a low entry point does not make it a hobbyist one, that’s why it’s still being improved. Developers welcomed the changes when it moved from version 3 to version 4, with good reasons. They should just be as happy that it keeps evolving. The realist in each of us saw this coming, it is part of any software development cycle. If you didn’t maybe you chose not to.

Now, you have found your bread and butter and you talk about political decisions when the php dev team gave us three years to make a technical one and is giving an additional one to force a transition. There are initiatives meant to unify all vendors to encourage that move. Instead of seizing this as an opportunity to go forward in unison with the entire community, and maybe convince hosts, users and the remaining reluctant developers that this is the right move (and indeed it is), your response is to defend your turf. How much more political can you get?

You say that your software works under php5. Then where is the problem? You say that you would adopt php6, what would make a move to php6 different from a move to php5 from your end users’ perspective?

The main point with which I agree with you is that hosts should stop being blamed for the slow evolution of php5, I have continuously pointed the finger at developers and vendors who find it just too easy to adopt the status quo. It’s perfectly acceptable to do so, but please don’t cry wolf when you get caught. To you, we have to keep making these hybrid software that “get the job done”, because everybody else oblivious to what goes on under the hood, can just not bare to upgrade? For how long? is this where php should end? Is WordPress the holy grail of php development?

I’ve slowly but suring been migrating all my servers and scripts from PHP4 to PHP5 and, for the most part, it’s been all sunshine and rainbows. But when it doesn’t work, BOY is it hard to make that transition. This is especially true if your old apps had any XML/XSL in them. You are forced to rewrite huge chunks of code or use PHP4-PHP5 wrappers, which are a stopgap solution at best. Even so, IMO, PHP5 is simply a better overall implementation than PHP4.

IMHO this change comes very late. Since PHP6 will arise next year it’s already late to bring the people (especially the hosting services) to this change.
If the change from PHP5 to PHP6 – which will bring much bigger changes than the step from PHP4 to 5 – will take the same time, we will use PHP5 till 2013 which is about 10 years of PHP5 developement…

Okay, when I started with PHP 5 there several problems and incompatibilities with some application. But since 1 or 2 years every application is tested with PHP 5 so there should be no trouble when upgrading to the next major version.

I’m one of those supporting the GoPHP5 movement, but I’m not going to do like some and post the good/bad about PHP4 and PHP5.

Although, on the subject of PHP4…

On my blog I have a post saying “Finally! PHP4 End Of Life”, however I do believe the PHP group pulled the plug a little early. Not only that, only a year of security fixes – not enough IMHO. While I agree PHP4 should be EOL’ed, I think the PHP group should have thought about that move a little more. Most sys. admins won’t be upgrading since things are likely to break under PHP5, which would lead to pissed off customers – a year or so of testing wouldn’t really be enough for them IMHO.

And on PHP5 – I moved all of my sites to PHP5 earlier this year, and one thing I won’t agree on (posted in some comments) is that it’s slower.. it’s been much much faster for me; especially my wordpress blog.

It all comes down to personal preference. Like with any language (or software for that matter), some will use (and prefer) one version over another.

It’s a complex issue being discussed and there is no one reason for the predicament. I can offer two that come to mind:

Shared hosting/hosts – PHP4 is so prevalent and entrenched in this environment that it’s mighty hard to get PHP 5 recognised as a stable alternative. Example: I fought hard to get PHP5 used in a 2005 job only to be told that it was “beta” and “unstable”. The server managers then went and installed 4.2 (3 years old at the time) and only with waving security notices and smelling salts under their noses did they “upgrade” to 4.3
Stupidy, ignorance or just plain “it’s PHP what do you care?” ?

Illusion of support: another major reason for the predicament is that PHP4 has, from the outside world, been undergoing regular releases and upgrades alongside PHP5. This allows people to think “Why upgrade PHP *and* code when I can just upgrade PHP and not touch any code”.
It’s this question which results in a lot of the crap code littering the web, as someone mentioned previously.

PHP5 makes it harder to produce dud code. The errors people may see in moving from PHP4 to 5 are due to the parser picking up the duds.

Personally, I’d heartily recommend you all upgrade to 5. Would you rather be stuck with a German toilet (http://asecular.com/~scott/misc/toilet.htm) or one where you don’t have to flush three times to do the same task?

someone said this: “When I need a “real” language, I generally turn to Python” and I agree. If php5 hadn’t come about I’d be doing all my webapps in python. why? because I like OO programming (not just namespace management with classes) and because XML is fact of life – and Java is excessive for modest sized sites.

Just because *your* app doesn’t need php5 is no reason to pretend no one else needs it or that those advocating it are evil. Change is inevitable… that is, unless you run Debian stable.

cyberRodent, I agree and want to add that Python adoption for web development would probably be much higher if hosting providers offered it by default. If there were more open source web apps built with python and hosting providers offered it there would be some serious competition to PHP.

Having just finished a php5 migration of our code I think 5 is huge improvement over 4 if you are writing OO code. The stuff written in 5 really is great, more maintainable, easier to understand and easier to modify. Of course you can write bad OO code, but I think good oo practice informed by patterns really is a great reason to use php 5. Of course, I haven’t done any development in php 4 for a couple years now. Definitely looking forward to 6.

I wrote library Texy2 in pure PHP5 OOP code, but there was still a lot of (or majority?) users having only PHP4. So I wrote PHP 5 -> 4 converter and generated version running in PHP4 (converter is available for free here http://www.dgx.cz/trine/item/php-5-4-converter).

The question of why PHP 4 was so successful and what PHP 5 can do to capitalize on those stengths is a straw man. PHP 4 rose to prominence as everyone migrated from Perl CGIs. Now you have an entrenched code base.

PHP 5 is clearly superior to 4… it’s just not superior enough to warrant the upgrade. And with PHP 4 already having achieved critical mass, there’s simply no place for PHP 5 to steal the users from.

The other issue is that PHP was originally just hacked together to make dynamic web programming easy, but there was never much vision behind it. So of course the people attracted to that kind of language are going to be satisfied with “good enough”, while anyone seriously interested in PHP 5 (or 6) should probably be looking at better languages like Python, Smalltalk, Ruby, or even Java.

Personally for me there is no way PHP4 is better than PHP5, I develop for one of the UK’s larger search engine marketing companies, The Technology Works, and for us personally we couldnt wait to get on PHP5 primarily for the OO features. I think the problem is that PHP has hobby-ist roots and most of the users are still scripters who wouldnt know how to make use of the features. It will change though, lots of companies have roots in PHP and are reaching a size were they need to adopt OO. Plus you have alot of great libraries and frameworks comming out now that need PHP5 – Symfony and the Zend Framework to name a couple.