{"id":1164,"date":"2025-04-15T18:19:20","date_gmt":"2025-04-15T10:19:20","guid":{"rendered":"https:\/\/cloudnewoffer.com\/?p=1164"},"modified":"2025-04-15T18:19:20","modified_gmt":"2025-04-15T10:19:20","slug":"php-8-4-highlights-what-is-new-features-and-improvements-explained","status":"publish","type":"post","link":"https:\/\/cloudnewoffer.com\/?p=1164","title":{"rendered":"PHP 8.4 Highlights: What is New, Features and Improvements Explained"},"content":{"rendered":"<div class=\"post-page post-page__post-content\">\n<div class=\"flex flex--direction-column flex--gap-xs\">\n<div class=\"post-page__category flex flex--gap-xs flex--align-center\">\n<p>                            Service Updates<\/p>\n<p>                        <span class=\"text--color-pri\">\u2022<\/span><\/p>\n<p>                            Speed<\/p>\n<p>                        <span class=\"text--color-pri\">\u2022<\/span><\/div>\n<h1>PHP 8.4 Highlights: What is New, Features and Improvements Explained<\/h1>\n<div class=\"flex flex--gap-xs flex--align-center text--size-3xs text--color-dark\"><span class=\"post-page__footer__date\"><br \/>\n                            Jan 30, 2025<br \/>\n                        <\/span><span>\u2022<\/span><span><br \/>\n                                                            8 min read                                                    <\/span><span>\u2022<\/span><span>Daniel Kanchev<\/span><\/div>\n<\/div>\n<div class=\"post-image-wrapper\"><img loading=\"lazy\" decoding=\"async\" class=\" screenshot\" width=\"1200\" height=\"600\" src=\"https:\/\/static-blog.siteground.com\/wp-content\/uploads\/sites\/2\/2025\/01\/PHP-8.4-highlights.jpg\" alt=\"A featured image with a laptop, displaying the official PHP.net logo of PHP 8.4, and the signature PHP elephant icon.\"><\/div>\n<div class=\"post-page__header no-display--1200\">\n<ul class=\"accordion--arrow\">\n<li class=\"accordion__container border--radius-medium active\">\n<div class=\"accordion__container__title bg--color-main border--radius-medium density-w--s density-h--xs active\">\n<p class=\"text--weight-l text--size-xxs text--color-pri-darkest text--upper\">\n                                    Table of Contents                                <\/p>\n<\/div>\n<div class=\"accordion__container__content text--size-xxs text--color-pri-darkest\">\n<ul class=\"ez-toc-list ez-toc-list-level-1 \">\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\">PHP 8.4 Key Takeaways<\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\">What is New in PHP 8.4?<\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\">PHP 8.4 Deprecations<\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\">How to Upgrade to PHP 8.4?<\/li>\n<li class=\"ez-toc-page-1 ez-toc-heading-level-2\">PHP 8.4: Recap and Next Steps<\/li>\n<\/ul>\n<\/div>\n<\/li>\n<\/ul>\n<\/div>\n<p>Packed with powerful features and enhancements, the latest PHP 8.4 version promises to make coding more efficient and flexible.<\/p>\n<p>Released officially in late November 2024, at SiteGround, PHP 8.4 has been around in beta since August 2024, when we were among the first companies to make it available for testing on all our servers.<\/p>\n<p>Since then, we\u2019ve seen that it is becoming more and more popular. Over 6000 website owners hosting with SiteGround have already tried it on their website.<\/p>\n<p>If you\u2019re wondering whether you should make the switch and what\u2019s the fuss about, keep reading as we\u2019re covering all you need to know about PHP 8.4, from its standout features to practical tips who will benefit from it the most. Let\u2019s dive in!<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-php-8-4-key-takeaways\">PHP 8.4 Key Takeaways<\/h2>\n<p>PHP 8.4 marks a significant update in PHP\u2019s lifecycle, introducing bug fixes, features and enhancements that optimize performance and development.<\/p>\n<p>Features like enhanced property handling, new helper functions, and advanced database tools simplify coding and improve efficiency.<\/p>\n<p>Using the latest versions also helps protect against vulnerabilities in the long-run.<\/p>\n<p><strong>However, as a website owner, you have to be careful \u2013 the most recent versions may not be compatible with your website.<\/strong> We recommend testing it on a website staging copy first.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-release-timeline-and-siteground\">Release Timeline and SiteGround<\/h3>\n<p>PHP 8.4 (Beta 3) was released on <strong>August 15th, 2024<\/strong>. SiteGround introduced early access to it on <strong>August 20th, 2024<\/strong>, so our clients could use it for testing as early as possible.<\/p>\n<p>PHP 8.4\u2019s <strong>general availability release (GA)<\/strong> was on <strong>November 21, 2024<\/strong>. SiteGround added the official version to our servers on <strong>November 26th, 2024<\/strong>, just five days after it was announced.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-what-is-new-in-php-8-4\">What is New in PHP 8.4?<\/h2>\n<p>PHP 8.4 introduces multiple new features that can be categorized into syntax enhancement, library and API improvements, and better array manipulation.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-1-syntax-and-language-enhancements\">1. Syntax and Language Enhancements<\/h3>\n<h4 class=\"wp-block-heading\" id=\"h-1-1-property-hooks\">1.1. Property Hooks<\/h4>\n<p>In PHP versions prior to 8.4, managing property access and modification typically involved defining explicit getter and setter methods within a class.<\/p>\n<p>This approach, while functional, often led to more verbose code and separated the property\u2019s behavior from its declaration.<\/p>\n<pre class=\"wp-block-code\"><code>class User {\n    private string $firstName;\n    private string $lastName;\n\n    public function __construct(string $firstName, string $lastName) {\n        $this-&gt;firstName = $firstName;\n        $this-&gt;lastName = $lastName;\n    }\n\n    public function getFullName(): string {\n        return $this-&gt;firstName . ' ' . $this-&gt;lastName;\n    }\n\n    public function setFullName(string $fullName): void {\n        [$this-&gt;firstName, $this-&gt;lastName] = explode(' ', $fullName, 2);\n    }\n}\n\n$user = new User('John', 'Doe');\necho $user-&gt;getFullName(); \/\/ Outputs: John Doe\n$user-&gt;setFullName('Jane Smith');\necho $user-&gt;getFullName(); \/\/ Outputs: Jane Smith<\/code><\/pre>\n<p>In this example, the <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">getFullName<\/mark> and <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">setFullName<\/mark> methods are used to access and modify the user\u2019s full name.<\/p>\n<p>With the introduction of property hooks in PHP 8.4, developers can now define custom behavior for property access (<mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">get<\/mark>) and modification (<mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">set<\/mark>) directly within the property declaration.<\/p>\n<p>This feature streamlines the code by embedding the logic within the property itself.<\/p>\n<p><strong>Using Property Hooks in PHP 8.4:<\/strong><\/p>\n<pre class=\"wp-block-code\"><code>class User {\n    private string $firstName;\n    private string $lastName;\n\n    public function __construct(string $firstName, string $lastName) {\n        $this-&gt;firstName = $firstName;\n        $this-&gt;lastName = $lastName;\n    }\n\n    public string $fullName {\n        get =&gt; $this-&gt;firstName . ' ' . $this-&gt;lastName;\n        set {[$this-&gt;firstName, $this-&gt;lastName] = explode(' ', $value, 2);}\n    }\n}\n\n$user = new User('John', 'Doe');\necho $user-&gt;fullName; \/\/ Outputs: John Doe\n$user-&gt;fullName = 'Jane Smith';\necho $user-&gt;fullName; \/\/ Outputs: Jane Smith <\/code><\/pre>\n<p>In this updated example, the <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">fullName<\/mark> property utilizes property hooks to define the <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">get<\/mark> and <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">set<\/mark> behaviors directly within its declaration.<\/p>\n<p>This approach reduces the need for separate methods and keeps the property\u2019s logic encapsulated within its definition.<\/p>\n<p>For a comprehensive understanding and additional examples, refer to the official PHP manual on property hooks.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-1-2-asymmetric-visibility\">1.2. Asymmetric Visibility<\/h4>\n<p>In PHP 8.4, <strong>asymmetric visibility<\/strong> allows developers to define separate access levels for reading and writing class properties.<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\" screenshot\" loading=\"lazy\" width=\"1024\" height=\"521\" src=\"https:\/\/static-blog.siteground.com\/wp-content\/uploads\/sites\/2\/2025\/01\/php-assymetric-visibility-1024x521.jpeg\" alt=\"A screenshot of a code snippet from the official PHP.net documentation, highlighting how new asymmetric visibility enhancements change coding practices.\"><\/figure>\n<p>The visibility declaration public private(set) is used to allow public access for reading but restrict private access for setting the value. This allows the property to be readable from outside the class but only modifiable within the class.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-1-3-deprecated-attribute\">1.3. <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">#[Deprecated]<\/mark> Attribute<\/h4>\n<p>In PHP 8.4, the <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">#[Deprecated]<\/mark> attribute was introduced to mark classes, methods, functions, or properties as deprecated.<\/p>\n<p><strong>This serves as a formal indication that the marked element is discouraged for use and may be removed in future versions.<\/strong><\/p>\n<p>Utilizing this attribute enhances code clarity and assists developers in identifying and transitioning away from deprecated features.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-1-4-new-myclass-gt-method-without-parentheses\">1.4. <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">New MyClass()-&gt;method()<\/mark> without Parentheses<\/h4>\n<p>In PHP 8.4, the syntax for invoking a method directly after creating a new instance of a class has been enhanced. Previously, you would instantiate a class and then call a method on that instance in two separate steps:<\/p>\n<pre class=\"wp-block-code\"><code>$instance = new MyClass();\n\n$instance-&gt;method();<\/code><\/pre>\n<p>With PHP 8.4, you can now chain the method call directly to the instantiation, eliminating the need for parentheses:<\/p>\n<pre class=\"wp-block-code\"><code>new MyClass-&gt;method();<\/code><\/pre>\n<p>This streamlined syntax improves code readability and reduces verbosity.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-2-library-and-api-improvements\">2. Library and API Improvements<\/h3>\n<h4 class=\"wp-block-heading\" id=\"h-2-1-object-api-for-bcmath\">2.1. Object API for BCMath<\/h4>\n<p>In PHP 8.4, the BCMath extension introduces the <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">BcMathNumber<\/mark> class, providing an object-oriented approach to arbitrary precision arithmetic.<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\" screenshot\" loading=\"lazy\" width=\"1024\" height=\"329\" src=\"https:\/\/static-blog.siteground.com\/wp-content\/uploads\/sites\/2\/2025\/01\/object-API-BCMath-1024x329.jpeg\" alt=\"A screenshot of a code snippet from the official PHP.net documentation, highlighting how to implement an object-oriented approach to arbitrary precision arithmetic using the new BcMathNumber class.\"><\/figure>\n<p>This enhancement allows for more intuitive and readable code when performing decimal calculations.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-2-2-new-ext-dom-features-with-enhanced-html5-support\">2.2. New <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">ext-dom<\/mark> Features with Enhanced HTML5 Support<\/h4>\n<p>The <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">ext-dom<\/mark> extension has been enhanced to provide robust, standards-compliant support for parsing and manipulating HTML5 documents.<\/p>\n<p>This improvement addresses long-standing issues and introduces new features that streamline working with HTML5 content.<\/p>\n<p><strong>Key Enhancements:<\/strong><\/p>\n<ol class=\"wp-block-list\">\n<li><strong>Introduction of <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">DomHTMLDocument<\/mark> Class:<\/strong>\n<ul class=\"wp-block-list\">\n<li>A new class, <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">DomHTMLDocument<\/mark>, has been added to the Dom namespace. This class offers a modern, object-oriented interface for handling HTML5 documents, ensuring better integration and usability.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Improved Parsing and Serialization:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The new API provides accurate parsing and serialization of HTML5 documents, resolving previous compliance issues. This ensures that HTML5 content is handled correctly, facilitating more reliable document manipulation.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Enhanced Functionality:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Several new functions have been introduced to simplify common tasks, such as querying elements using CSS selectors and traversing the DOM. These additions make it more convenient to work with HTML5 documents.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4 class=\"wp-block-heading\" id=\"h-2-3-pdo-driver-specific-subclasses\">2.3. PDO Driver-Specific Subclasses<\/h4>\n<p>In PHP 8.4, the introduction of <strong>PDO driver-specific subclasses<\/strong> enhances the flexibility and functionality of the PDO (PHP Data Objects) extension. This enhancement allows developers to access database features such as driver specific sql parsers, that were previously inaccessible through the generic <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">PDO<\/mark> class.<\/p>\n<p><strong>Key Features:<\/strong><\/p>\n<ul class=\"wp-block-list\">\n<li><strong>Access to Driver-Specific Methods:<\/strong> Each PDO driver now has its own subclass, enabling access to methods unique to that database system. For example, the <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">PdoSqlite<\/mark> subclass provides methods like <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">createFunction()<\/mark>, which are specific to SQLite.<\/li>\n<li><strong>Improved Code Clarity:<\/strong> By utilizing these subclasses, code becomes more readable and maintainable, as database-specific functionalities are encapsulated within their respective classes.<\/li>\n<\/ul>\n<pre class=\"wp-block-code\"><code>\/\/ Using PDO::connect() to instantiate the driver-specific subclass\n\n$pdo = PDO::connect('sqlite:\/path\/to\/database.db');\n\n\/\/ Using the driver-specific method\n\n$pdo-&gt;createFunction('my_function', function($value) {\n\nreturn strtoupper($value);\n\n});<\/code><\/pre>\n<p>In this example, <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">PDO::connect()<\/mark> returns an instance of <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">PdoSqlite<\/mark>, allowing access to SQLite-specific methods like <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">createFunction()<\/mark>.<\/p>\n<p><strong>Backward Compatibility:<\/strong><\/p>\n<p>This enhancement maintains backward compatibility. Existing code using the generic PDO class continues to function as before. Developers can choose to utilize the driver-specific subclasses when they need access to database-specific features.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-2-4-standard-library-updates\">2.4. Standard Library Updates<\/h4>\n<p>Beyond major library and API changes, PHP 8.4 refines its standard library with helpful new utility functions and subtle enhancements.<\/p>\n<p>For example, developers now have access to <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">fpow()<\/mark> for floating-point exponentiation, new lazy objects and new methods for managing HTTP response headers.<\/p>\n<p>Additionally, the DateTime library receives precision-focused updates, which improves how PHP handles time-related tasks. These updates, though smaller in scope, contribute to a smoother and more efficient development experience.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-3-new-helper-functions\">3. New Helper Functions<\/h3>\n<p>PHP 8.4 introduces new array functions, providing more versatile and efficient ways to manipulate arrays.<\/p>\n<ul class=\"wp-block-list\">\n<li><strong><mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">array_find<\/mark> \u2013 <\/strong>Searches an array for the first element that satisfies a given condition.<\/li>\n<li><strong><mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">array_find_key<\/mark> \u2013 <\/strong>Finds the key of the first element in an array that meets a specified condition.<\/li>\n<li><strong><mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">array_any<\/mark> \u2013 <\/strong>Checks if any element in an array satisfies a given condition.<\/li>\n<li><strong><mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">array_all<\/mark> \u2013 <\/strong>Determines if all elements in an array meet a specified condition.<\/li>\n<\/ul>\n<pre class=\"wp-block-code\"><code>$numbers = [1, 2, 3, 4, 5];\n\n\/\/ Find the first even number\n$firstEven = array_find($numbers, fn($n) =&gt; $n % 2 === 0);\necho $firstEven; \/\/ Outputs: 2\n\n\/\/ Find the key of the first number greater than 3\n$key = array_find_key($numbers, fn($n) =&gt; $n &gt; 3);\necho $key; \/\/ Outputs: 3\n\n\/\/ Check if any number is greater than 4\n$anyGreaterThanFour = array_any($numbers, fn($n) =&gt; $n &gt; 4);\nvar_dump($anyGreaterThanFour); \/\/ Outputs: bool(true)\n\n\/\/ Check if all numbers are positive\n$allPositive = array_all($numbers, fn($n) =&gt; $n &gt; 0);\nvar_dump($allPositive); \/\/ Outputs: bool(true)<\/code><\/pre>\n<p><strong>These additions streamline array operations, enhance code clarity, and reduce the need for verbose loops.<\/strong><\/p>\n<h2 class=\"wp-block-heading\" id=\"h-php-8-4-deprecations\">PHP 8.4 Deprecations<\/h2>\n<p>With each new PHP release, some features are marked as deprecated to pave the way for better alternatives. Deprecations help PHP to evolve while giving developers time to adjust their code<strong>.<\/strong><\/p>\n<p>One notable deprecation in PHP 8.4 is the removal of dynamic properties on standard objects, a feature long used for quick, ad-hoc property assignments. Another example is the deprecation of implicit nullable types.<\/p>\n<p>Developers are now encouraged to use typed properties or magic methods like <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">__get<\/mark> and <mark style=\"background-color: transparent;color: #1e7b19\" class=\"has-inline-color\">__set<\/mark> for better performance and clarity.<\/p>\n<p>For a complete list of deprecated features, you can check out the official <strong>documentation<\/strong>released by the php team.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-1-backward-incompatible-changes\">1. Backward incompatible changes<\/h3>\n<p>There is a difference between <strong>deprecations<\/strong> and <strong>backward incompatible changes<\/strong>. With each release, there are also changes that <strong>fully break how certain syntax and code functions work.<\/strong><\/p>\n<p>For a full list of backward incompatible updates, refer to the <strong>official PHP documentation<\/strong>.<\/p>\n<p><strong>This means you have to be extra careful about switching to a more recent version<\/strong>. Often, if you are using 3rd party software, you may run into issues since it takes time for developers to update their products so they are compatible with the most recent PHP version.<\/p>\n<p>This is why you should use a staging environment to test if the newest release breaks parts of your website. <strong>This is especially important if you are currently running a version older than 8.0.<\/strong><\/p>\n<p>We\u2019ll show you how you can safely do this using SiteGround\u2019s tools later in the article.<\/p>\n<p>.post-page__colored-blocks.post-page__colored-blocks&#8211;update p {<br \/>\n    margin: 15px 0px;<br \/>\n} <\/p>\n<div class=\"post-page__colored-blocks post-page__colored-blocks--update\">\n<p class=\"text text--size-medium color-darkest\">If you manage a website, it\u2019s a good time to audit your code for deprecated features. Addressing these changes now can save you headaches when future PHP versions remove them entirely.<\/p>\n<p><strong>You can request a PHP compatibility check as part of our <\/strong><strong>Expert Care services<\/strong>, so the review and upgrade can be handled professionally by our technicians.<\/p>\n<\/div>\n<h3 class=\"wp-block-heading\" id=\"h-2-version-support\">2. Version Support<\/h3>\n<p>PHP 8.4 will receive active support for two years, followed by two years of critical security updates. You can review the <strong>official PHP documentation<\/strong> for the exact cutoff dates.<\/p>\n<p><strong>If you are using a deprecated version of PHP, we strongly recommend updating to the most recent stable version for improved security and performance.<\/strong><\/p>\n<h2 class=\"wp-block-heading\" id=\"h-how-to-upgrade-to-php-8-4\">How to Upgrade to PHP 8.4?<\/h2>\n<p>For most users, we recommend staying on <strong>Managed PHP <\/strong>to avoid any complications and breaking your production website. If you are technically savvy, and wish to test how your site runs on 8.4, keep reading so you can learn how to do it safely.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-1-siteground-s-managed-php\">1. SiteGround\u2019s Managed PHP<\/h3>\n<p>By default, all SiteGround clients are set to our <strong>Managed PHP<\/strong> service, which means that we will automatically update your PHP version once a newer <strong>stable<\/strong> version is available.<\/p>\n<p>This is recommended for most users that are not tech-savvy, because the newest versions may introduce a conflict in your application due to a plugin or theme incompatibility.<\/p>\n<p>.post-page__colored-blocks.post-page__colored-blocks&#8211;update p {<br \/>\n    margin: 15px 0px;<br \/>\n} <\/p>\n<div class=\"post-page__colored-blocks post-page__colored-blocks--update\">\n<p class=\"text text--size-medium color-darkest\">We carefully evaluate each new PHP release and perform tests for compatibility with the most widely used applications on our platform.<\/p>\n<p>As of February 2025, SiteGround\u2019s <strong>default Managed PHP version<\/strong> on our servers is <strong>8.2.<\/strong><\/p>\n<p>We recommend this version as the most widely-compatibale latest release. Before upgrading our default PHP version, we always make sure we have enough usage data to ensure the security, stability, and performance for the majority of websites on our platform.<\/p>\n<p>That\u2019s why we allow some time before switching our default version to each new release, even though the latter are available for testing on our servers almost immediately after going out.<\/p>\n<p><strong>Advanced users can manually switch to PHP 8.4 at any time via Site Tools.<\/strong><\/p>\n<\/div>\n<h3 class=\"wp-block-heading\" id=\"compatibility\">2. Compatibility<\/h3>\n<p>As we mentioned, <strong>all newest PHP releases can cause errors on your website<\/strong>, <strong>so it\u2019s always recommended to test the most recent versions in a staging environment first.<\/strong><\/p>\n<p>We offer a hassle-free, one-click tool that allows you to easily create a clone of your WordPress site, which you can use to check for any plugin or theme conflicts before upgrading your main website.<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\" screenshot\" loading=\"lazy\" width=\"1024\" height=\"434\" src=\"https:\/\/static-blog.siteground.com\/wp-content\/uploads\/sites\/2\/2025\/01\/staging-tool-1024x434.jpeg\" alt=\"A screenshot of SiteGround's Site Tools dashboard page, where you can create a Staging copy of your WordPress site.\"><\/figure>\n<p>Once you\u2019ve created a staging copy, follow the steps below if you wish to to switch it to PHP 8.4 and test how it works on your site.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-3-test-php-8-4\">3. Test PHP 8.4.<\/h3>\n<p>Most providers offer a PHP management tool to switch between different versions for your website. To upgrade to <strong>8.4<\/strong> manually on <strong>SiteGround<\/strong>, go to your <strong>Site Tools<\/strong>dashboard &gt;<strong> Devs <\/strong>&gt;<strong> PHP manager<\/strong>:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\" screenshot\" loading=\"lazy\" width=\"1024\" height=\"502\" src=\"https:\/\/static-blog.siteground.com\/wp-content\/uploads\/sites\/2\/2025\/01\/php-manager-1024x502.jpeg\" alt=\"A screenshot of SiteGround's Site Tools dashboard PHP manager, where you can change the PHP settings of your sites.\"><\/figure>\n<p>Switch to the <strong>Staging Sites <\/strong>tab:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\" screenshot\" loading=\"lazy\" width=\"1024\" height=\"383\" src=\"https:\/\/static-blog.siteground.com\/wp-content\/uploads\/sites\/2\/2025\/01\/staging-sites-php-manager-1024x383.jpeg\" alt=\"A screenshot of SiteGround's Site Tools dashboard PHP manager, where you can change the PHP settings of a staging site.\"><\/figure>\n<p>Click the <strong>Edit <\/strong>button under <strong>Actions, <\/strong>switch from <strong>Managed PHP <\/strong>to <strong>Change PHP version manually, <\/strong>and select <strong>8.4.3.<\/strong><\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\" screenshot\" loading=\"lazy\" width=\"1024\" height=\"446\" src=\"https:\/\/static-blog.siteground.com\/wp-content\/uploads\/sites\/2\/2025\/01\/change-php-version-menu-1024x446.jpeg\" alt=\"A screenshot of SiteGround's Site Tools dashboard menu, where you change the PHP version of a website, with a dropdown showing available versions ranging from 8.0 to 8.4.\"><\/figure>\n<p>It\u2019s that simple! The next step is to check if the website works as expected. If some functionality breaks, you would need to investigate further.<\/p>\n<p>Maybe a plugin or the theme that you are using is not fully compatible with the newest version yet. Or, there could be some custom PHP code in your site that needs to be revamped.<\/p>\n<p>In such cases, it\u2019s best to remain on our <strong>Managed PHP <\/strong>version and wait until these issues are addressed, before upgrading your main website to the latest PHP release.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-4-ultrafast-php\">4. Ultrafast PHP<\/h3>\n<p>SiteGround has a well-established reputation for focusing on performance optimization. This is why our team has developed a custom rendition of PHP that <strong>increases website performance by up to 30%<\/strong><strong>.<\/strong><\/p>\n<p>It is exclusively available to our users on GrowBig plans (and above) and is fully compatible with PHP 8.4. If you wish to take advantage of it, check out our Managed Hosting solutions and sign up today to boost your website speed!<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\" screenshot\" loading=\"lazy\" width=\"1024\" height=\"456\" src=\"https:\/\/static-blog.siteground.com\/wp-content\/uploads\/sites\/2\/2025\/01\/get-speed-hosting-banner-1024x456.jpg\" alt=\"A promotional banner listing SiteGround's unique speed hosting features.\"><\/figure>\n<h2 class=\"wp-block-heading\" id=\"h-php-8-4-recap-and-next-steps\">PHP 8.4: Recap and Next Steps<\/h2>\n<p>PHP 8.4 is a useful improvement for developers and website owners alike. With its streamlined syntax, improved APIs, and new features, <strong>it simplifies coding while boosting website performance and reliability.<\/strong><\/p>\n<p>Staying up to date with PHP versions is essential for maintaining a fast and reliable online presence. Upgrades should be handled carefully, to ensure a smooth transition and a seamless experience for your visitors.<\/p>\n<p>This is why it is important to use a hosting provider that is up to speed with the latest technologies and offers the necessary tools to safely manage your website.<\/p>\n<p>At SiteGround, we make upgrading hassle-free. With our <strong>Managed PHP<\/strong> and <strong>Ultrafast PHP<\/strong> services, you can enjoy peak performance and seamless updates.<\/p>\n<p>Ready to experience the best PHP 8.4 has to offer? Sign-up for our <strong>Managed Hosting plans <\/strong>today and future-proof your website!<\/p>\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-1 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\">GET STARTED<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Service Updates \u2022 Speed \u2022 PHP 8.4 Highlights: What is New, Features and Improvements Explained Jan 30, 2025 \u2022 8 min read \u2022Daniel Kanchev Table of Contents PHP 8.4 Key Takeaways What is New in PHP 8.4? PHP 8.4 Deprecations How to Upgrade to PHP 8.4? PHP 8.4: Recap and Next Steps Packed with powerful &hellip;<\/p>\n","protected":false},"author":1,"featured_media":1165,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[27,32],"class_list":["post-1164","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-message","tag-service-updates","tag-speed"],"_links":{"self":[{"href":"https:\/\/cloudnewoffer.com\/index.php?rest_route=\/wp\/v2\/posts\/1164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudnewoffer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudnewoffer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudnewoffer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudnewoffer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1164"}],"version-history":[{"count":0,"href":"https:\/\/cloudnewoffer.com\/index.php?rest_route=\/wp\/v2\/posts\/1164\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudnewoffer.com\/index.php?rest_route=\/wp\/v2\/media\/1165"}],"wp:attachment":[{"href":"https:\/\/cloudnewoffer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudnewoffer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudnewoffer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}