Deploy with PHP 7.3 this Friday, er, Thursday
PHP continues its steady march forward, and today marks the release of the latest version, PHP 7.3.
It also marks its release on Platform.sh, and our first holiday gift to you this season.
So what’s new?
PHP 7.3 brings continued incremental performance improvements to the language. It’s not as big as the jump to 7.0 was (few things can be), but the same code running under PHP 7.3 should be a bit faster than on 7.2.
While there’s no earth-shattering additions in this version, there are a few nice pluses. Like a handful of new utility functions, such as
array_key_last() (all of which are fairly self-explanatory). What’s most exciting for language nerds that follow PHP’s development (like yours truly)? Trailing commas in function calls are now legal, just as they have been on array definitions for years; Heredoc and Nowdoc syntax are now also more forgiving, allowing for more nicely formatted, multiline strings; the JSON utilities can now be set to throw exceptions, like most newer functionality, allowing error handling to be more consistent throughout the application.
OK, it’s not going to change the world, but it’s still nice.
There are also a number of deprecations around edge cases to flag behaviors that are expected to go away in PHP 8.0. (Yes, we did just say that number.) See the Changelog for the full list of changes and fixes.
Cool, so how do I do it?
As always at Platform.sh, it’s just a YAML tweak away. In your
.platform.app.yaml file (not on the master branch), change your application
php:7.3, like so:
That’s it. When next you push on that branch, you’ll get the PHP 7.3 container. Test it out, and make sure everything is working (it should be fine), then merge back to master when you’re ready.
Enjoy the latest and greatest PHP has to offer—any day of the week!