PHP7: Easiest Upgrade Yet

With PHP7 looking increasingly stable (relatively speaking, it’s still pre-alpha so it’s VERY early days and anything could happen!), and work going well on the GoPHP7-ext project to get extensions converted, I have been thinking about the migration guides we’ll need to help people upgrade their existing applications. To this end, I took the simplest project I currently have (http://api.joind.in) and gave it a whirl on PHP7, using Rasmus’ PHP7 dev box. The result:


Continue reading

Running Multiple Versions of PHP

When I advise people about upgrading their PHP version, I say things like “just run your test suite with the new version” “just grab the new version and try your site with the built-in webserver”. A couple of people recently have asked for more detail on how to actually achieve these things so here’s a quick primer on getting new PHP without touching anything to do with your existing PHP installation. Continue reading

PHP 5.6 and the Splat Operator

We have a couple of new features coming in to PHP 5.6 with names that sound much less exciting than the features they actually represent: “variadic functions” sound positively academic, and “argument unpacking” isn’t exactly catchy. However they both use a new operator in PHP which looks like an elipsis (three dots …) and is referred to as either the splat operator or the scatter operator. I included them in a recent version of my “Upgrading PHP” talk so I thought I’d share the examples here too in case anyone is interested. Continue reading