We are happy to announce that PHP 8.3 (Beta 3) is now available for testing on all SiteGround servers. Again thanks to our unique multi-server PHP setup, we can safely provide the latest PHP versions to anyone who wants to try them out, almost immediately after their official beta release . This means that we are once again among the first companies to offer PHP 8.3 (Beta3) for testing on our hosting platform
Read on to find out more about the new features in the latest version of PHP.
New features
Let’s dive into some of the new features that PHP 8.3 Beta3 brings to the table. This release may not be notable for radical changes or major updates, but it does introduce some key features that could significantly improve the PHP development experience.
gc_status() returns additional GC information
Long-running daemons and cron jobs have always been a weak point in PHP in general. However, with PHP 8.3, the gc_status() function now returns additional garbage collection (GC) information. This is a significant improvement for developers who need to manage memory usage in long-running scripts. You can find more information about this feature here .
class_alias() supports Aliasing Built-in PHP Classes
Another interesting feature of PHP 8.3 is the ability to add aliases to PHP classes using the class_alias() function . This allows PHP developers to hook into predefined classes and override classes or declarations in them. This feature opens up a world of possibilities for extending and customizing the behavior of PHP classes.
json_validate() function
Another interesting addition in PHP 8.3 is the json_validate() function. This function validates whether a string contains valid JSON, providing a more efficient alternative to userland implementations that use json_decode(). The json_decode() function generates a ZVAL (object/array/etc.) while parsing the string, using otherwise saved memory and processing. The json_validate() function uses the same JSON parser that exists in the PHP core and is used by json_decode(), ensuring that what is valid in json_validate() is also valid in json_decode().
How to Test PHP 8.3 (Beta3) on SiteGround Servers
Now, with a click on your SiteTools -> Developers section you can replace greece whatsapp number data the current PHP version used by your website with PHP 8.3 (Beta3). It is important to emphasize the fact that this is PHP 8.3 in its Beta3 version. This means that it is available primarily for testing and as always, we strongly recommend you not to use it on your production website before the stable release date (November 23, 2023). If you want to test it with an existing website, set up a new staging site, clone your production site onto it, and play around with that – our WordPress staging tool is perfect for that purpose. When you are done, you can delete it.
As you explore your new test environment, review your log files after each test. Make sure nothing fails and check for any new warnings or errors.
Conclusion
PHP 8.3 Beta3 may not be marked by any major updates, but it does introduce a set of key features that could significantly improve the PHP development experience: improvements to read-only classes, the new gc_status(), class_alias() and json_validate() functions, additions to the recently added Randomizer class, stack overflow detection, and more. That’s not all, but there’s enough time to “play” with the new version of PHP 8.3 (Beta3) and explore all the features it brings before the official release.
Last but not least, remember that at SiteGround, we are committed to providing our customers with the latest and greatest in PHP technology, way ahead of everyone else. Stay tuned for more updates and h