PHP 8.4 is here: a revolutionary version with advanced features and performance improvements, designed to take web and application development to the next level.
Now, with PHP 8.4 available on Debian 11 and 12 in our Cloud using SWPanel, you can enjoy all its innovations in a secure, reliable, and up-to-date environment.
At SW Hosting, we are committed to always providing you with cutting-edge technology to maximize the efficiency and performance of your projects. This update is available for free with the Smart Hosting Startup, Smart Hosting Plus, Smart Hosting Growth, and Smart Hosting Unlimited Custom plans, and is also included in our Cloud services with SWPanel on Debian 11 and 12, both Cloud and Selfhosted versions.
Get the most out of your project with the fastest disks and most powerful CPUs in the Cloud.
With PHP 8.4 fully integrated into SWPanel, you’ll gain immediate access to features that enhance code writing, improve application execution, and streamline processes. Discover how PHP 8.4 empowers your projects with cleaner and more efficient code. If you’re already a SW Hosting client, activating PHP 8.4 on your Hosting and Cloud services is quick and easy—start enjoying all its benefits instantly.
The Property Hooks feature is one of the most anticipated updates in PHP 8.4, allowing you to define getters and setters directly in properties. This results in cleaner, more maintainable code by eliminating redundancies:
PHP - Copy Code
php
Copiar código
class BookViewModel { public string $credits { get { return implode(', ', array_map( fn (Author $author) => $author->name, $this->authors )); } } }
Thanks to PHP 8.4’s full compatibility with SWPanel, this functionality is available for your projects right away.
PHP 8.4 lets you chain methods on new instances without additional parentheses, making your code cleaner and easier to read:
Before:
PHP - Copy Code
(new ReflectionClass($objectOrClass))->getShortName();
Now:
PHP - Copy Code
new ReflectionClass($objectOrClass)->getShortName();
With SWPanel, you can start benefiting from this improvement immediately.
PHP 8.4 optimizes Just-In-Time (JIT) compilation, boosting speed and memory usage. Configuring JIT is now simpler than ever: deactivate it using opcache.jit=disable or enable it with opcache.jit=tracing. SWPanel is fully equipped to leverage these enhancements, delivering superior application performance and reduced system load.
PHP 8.4 eliminates implicit null types. Nulls must now be explicitly declared, avoiding ambiguities and ensuring greater clarity and security in your code:
Example before:
PHP - Copy Code
php
Copiar código
function save(Book $book = null) {}
Now:
PHP - Copy Code
php
Copiar código
function save(?Book $book = null) {}
The new \\\\\\\\Dom\\\\\\\\HTMLDocument class adds support for HTML5, simplifying its processing in PHP applications. While the DOMDocument class remains available, this enhancement offers a modern solution for handling HTML5 content.
Upgrading your PHP version to PHP 8.4 on SWPanel is quick and easy. Follow our complete guide to update in just a few steps and start enjoying its advantages today. Check out the guide here: https://www.swhosting.com/es/comunidad/manual/como-modificar-la-version-php-de-mi-servicio-de-hosting-mediante-swpanel
Our Hosting gives you the freedom to tailor your website to your brand and goals.
At SW Hosting, we are committed to bringing you the latest innovations and technological advancements to make your projects more efficient, faster, and successful. Don’t wait any longer to experience the benefits of PHP 8.4 on our Hosting and Cloud services, optimized to provide you with the best web development experience.