Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm about to start working on a new commercial PHP project with a friend that will be licensed and sold as a script to run on your own shared hosting account or server.

Looking at the statistics (http://w3techs.com/technologies/details/pl-php/5/all) 50.3% of PHP 5 installations are still PHP 5.2 or lower (43.5% being php 5.2). With this in mind, is it wise to ensure new software still supports PHP 5.2 given that such a high proportion of installations arent going to support modern PHP features such as namespacing and the likes of Composer.

share|improve this question
    
50% is a lot. What do you think the percentage will be when you release your code? My own unsupported opinion is that if it's over 25% when you release, you should either support it or degrade gracefully. –  Dan Pichelman May 17 '13 at 14:02
    
That's my worry, we're looking a good 6 months I would estimate. Its annoying as hell trying to decide. Do we stick with 5.2 so we can continue supporting software that went end of life over 2 years ago, or not support it and get the project done a hell of a lot faster due to being able to use composer packages and a modern framework. –  RickM May 17 '13 at 14:06
add comment

1 Answer

I don't think you can rely on statistics to show you this or not; the answer will depend more on who your prospective clients are.

Personally, I think you should be aiming to support PHP 5.3, as the new features really do make a significant difference. Performance is better, for a start.

If you want to appeal to the widest possible market, then support PHP 5.2, but at the end of the day, people will not upgrade unless they need to, which makes supporting older versions a bit of a circular problem; you'll have to support it in perpetuity.

share|improve this answer
    
Well, a lot of people still run on shared or managed hosting, so they can't really control which PHP version they're running. –  tdammers May 17 '13 at 14:09
1  
@tdammers True, but the OP suggested that this will be a commercial project. In that situation, you'd have to assume that the customer will have more control over their environment. Like I said as well, shared hosting companies simply won't upgrade unless their customers demand it - so supporting older versions just delays the inevitable. –  Stephen Orr May 17 '13 at 14:10
    
Shared hosting companies actually do upgrade without direct customer intervention, if only out of security consideration, or because they are upgrading their whole OS anyway and the new release comes with a newer PHP. –  tdammers May 17 '13 at 14:11
    
@tdammers Fair point - I've dealt with some providers who just would never upgrade, and others who were more than happy to do so. –  Stephen Orr May 17 '13 at 14:13
    
Just to clarify, when I say its a commercial project, I meant it will be sold/licensed out as a script for people to use. –  RickM May 17 '13 at 14:15
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.