PHP 8.3 Now Available on All Hosting Plans

Posted By: Tony Baird

Last Updated: Monday December 11, 2023

We’re happy to announce we now officially support PHP 8.3 on all our cloud shared, reseller and semi-dedicated plans. PHP 8.3 is the latest 8.x series release with many outstanding improvements and new features. You can switch to PHP 8.3 using our PHP Selector interface, which allows you to change PHP versions and modify extensions and PHP.ini values. Many applications are currently incompatible, but we allow you to switch to an older version easily with a quick button click.

Now, let’s take a quick look at a few of the many new features available in PHP 8.3

Typed Class Constants

interface Test {
    const string HOSTINGCOMPANY = 'Hawk Host';
}

class Foo implements Test {
    const string HOSTINGCOMPANY = [];
}

The following code would now produce the following error in PHP 8.3:

Fatal error: Cannot use array as value for class constant

json_validate Function

As of PHP 8.3, you can now check if a string is valid JSON. Before PHP 8.3, you can check the validity of JSON by using json_decode. However, json_validate() is faster if you only need to confirm the string is valid JSON.

var_dump(json_validate('{ "test": { "foo": "bar" } }')); // true

Additional Randomizer Functionality

In PHP 8.2, the random extension, but PHP 8.3 brings additional methods:

These methods can be beneficial. For example, getBytesFromString could be used to generate a subdomain randomly:

$randomizer = new \Random\Randomizer();

$randomSubdomain = sprintf(
    "%s.mydomain.com",
    $randomizer->getBytesFromString(
        'abcdefghijklmnopqrstuvwxyz0123456789',
        16,
    ),
);
echo $randomSubdomain;

These are just a few of the new features available in PHP 8.3. The complete list of changes is on the PHP 8.3 release page.

If PHP is not your language of choice, do not worry. We are also continually adding new versions of Python, Node.js, and Ruby. These can be selected using their respective application interfaces. As of December 2023, we support the following for PHP, Python, Node.js, and Ruby versions:

PHP

Python

Node.js

Ruby

Ready to get started? Build your site from
$2.24/mo
GET STARTED NOW