However, if you decide to deploy PHP 7.3 onto your servers, we would like to let you know that if you rely on memcached for caching, you might need to put it on hold first as this module is not available yet for PHP 7.3.
Since we at RunCloud roll out our own PHP version, we recommend that you do not install memcached using the command apt-get install php- because this will replace our PHP installation and may cause a conflict.
So Now, What Is out of the Door?
With the release of PHP 7.3 in December 2018, only PHP 7.1 onwards is supported by the PHP developers. But for PHP 7.1, only the critical security issues are supported where security fixes are released on an as-needed basis. No active support will be available.
PHP 7.0 no longer receives any support and it is highly recommended that users who are still on PHP 7.0 or lower to upgrade as soon as possible as the server may be exposed to unpatched security vulnerabilities.
What’s New with PHP 7.3
Compared to the previous versions, PHP 7.3 seems to perform significantly faster, especially for Wordpress hosting. Launched in early December 2018, there have been a few benchmark test results that are available on the Internet which show the improved performance of PHP 7.3. No doubt that the improvement are due to the updates in PHP 7.3. We will provide some summary of the updates in PHP 7.3 below but you can always check the full list of the features here if you want to.
The two syntaxes: Heredoc and Nowdoc, are used for multi-line long strings. Before this, it requires that the ending identifier should be the first string appearing in a new line. This means that developers have to remove the indentation in their codes so that the here/now doc tokens can be used. So now, PHP 7.3 allows for easier code readability since the codes can be indented, where the ending identifier does not need to be the first string of the line. The ending identifier can now be indented with spaces or tabs, which allows for easier code readability.
Allowing Trailing Commas
Trailing commas in function and method calls are now allowed. Trailing commas are basically commas that come after the last item in the list. This means that values can be added to the array (or list) in grouped namespace syntax, without throwing an error.
Better JSON Parsing
Even though this is not the core feature, this update is a very much appreciated feature. To parse JSON responses, there are 2 functions available: json_encode() and json_decode(), but they do not have a proper error throwing representation, where json_encode() throws a false error and json_decode will throw null, where null can be a true value. So with PHP 7.3, it will instead throw a JsonException (whatever that is set on json_last_error() and json_last_error_msg() throw) whenever an error occurs.
What is Deprecated in 7.3?
As with all updates, there are bound to be some things that are deprecated.
Removal of image2wbmp() Function
The function image2wbmp() returns the WBMP or bitmap image format. There is another similar function, which is imagewbmp() which performs the similar tasks, but it handles more than the image2wbmp() function, where the imagewbmp() also handles the necessary monochrome conversion. Since they are similar, the image2wbmp() is removed and any call to it will raise a fatal error. So all image2wbmp() function calls must be replaced with imagewbmp().
Removal of Case-Insensitive Constants
Before PHP 7.3, developers are able to use both case-sensitive and case-insensitive constants by using the define() function feature. You have to explicitly declare the constant case-sensitive by passing the third parameter of the function as true. But case-insensitive constants were creating inconsistencies in functionalities and was getting a bit complex to use. Therefore, to address this, PHP 7.3 proposes to deprecate case-insensitive constants.
With the release of PHP 7.3, this shows that PHP is still one of the best scripting language around due to the constant and rapid updates that is being pushed out by the core maintenance team where performance and security are constantly being improved.
And now that you have a rough idea of the updates in PHP 7.3 as well as what is deprecated, if you wish to upgrade your server, it is highly advisable that you create a staging environment that closely resembles the production environment and test your websites with all the plugins and modules that you use. With RunCloud, you can easily and quickly clone your servers using the dashboard for this purpose in under a few minutes and then continue straight to do the testing. Good luck!