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.
3
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.
6
I would say use the latest php5.5 as they are continuously developing so why not use the latest one plus you need to keep in mind MySQL are developing too. MySQL is about to be terminated and MySQLi and PDO comes into place and php5.5 supports both of them plus it comes with phar all you need to install pear to use other people’s code