{"id":6304,"date":"2021-04-20T14:37:07","date_gmt":"2021-04-20T14:37:07","guid":{"rendered":"https:\/\/www.fastcomet.com\/blog\/?p=6304"},"modified":"2025-12-17T19:03:20","modified_gmt":"2025-12-17T19:03:20","slug":"php-8-0-available","status":"publish","type":"post","link":"https:\/\/www.fastcomet.com\/blog\/php-8-0-available","title":{"rendered":"PHP 8.0 Deployed on FastComet (What\u2019s New)"},"content":{"rendered":"\n<p class=\"has-drop-cap\">The major PHP 8 release is here on the FastComet servers. Although it was officially released for General Availability on November 26, 2020, it is now fully available for all FastComet customers. After our extensive testing and monitoring, to guarantee complete compatibility of the integration with cPanel and our infrastructure, we can confidently state that it is safe to deploy the version that provides stability and optimal performance for the deployed PHP applications.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>This major update of the programming language brings many optimizations and powerful features. We\u2019re excited to drive you through the most interesting changes to allow all programmers to write better code and build more powerful applications. As always, PHP 8 does not disappoint. This post covers some of the essentials around PHP 8 and how FastComet customers can benefit from the overall upgrade.<\/p>\n\n\n\n<p class=\"h4\"><strong>Table of Contents:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list nav-list\">\n<li><a href=\"#h-php-8-for-all-fastcomet-users\">PHP 8.0 for all FastComet Users<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#h-php-7-4-is-now-selected-as-the-default-php-version-for-new-accounts\">PHP 7.4 is Now Selected as the Default PHP Version for New Accounts<\/a><\/li>\n\n\n\n<li><a href=\"#h-existing-accounts-should-best-perform-the-switch-manually\">Existing Accounts Should Best Perform the Switch Manually<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#h-what-are-the-php-8-improvements-and-features\">What are the PHP 8.0 Improvements and Features?<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#h-union-types\">Union Types<\/a><\/li>\n\n\n\n<li><a href=\"#h-just-in-time-jit\">Just in Time (JIT)<\/a><\/li>\n\n\n\n<li><a href=\"#h-named-arguments\">Named Arguments<\/a><\/li>\n\n\n\n<li><a href=\"#h-attributes\">Attributes<\/a><\/li>\n\n\n\n<li><a href=\"#h-match-expression\">Match Expression<\/a><\/li>\n\n\n\n<li><a href=\"#h-constructor-property-promotion\">Constructor Property Promotion<\/a><\/li>\n\n\n\n<li><a href=\"#h-new-static-return-type\">New static Return Type<\/a><\/li>\n\n\n\n<li><a href=\"#h-throw-expression\">Throw Expression<\/a><\/li>\n\n\n\n<li><a href=\"#h-inheritance-with-private-methods\">Inheritance with Private Methods<\/a><\/li>\n\n\n\n<li><a href=\"#h-weak-maps\">Weak Maps<\/a><\/li>\n\n\n\n<li><a href=\"#h-allowing-class-on-objects\">Allowing ::class on Objects<\/a><\/li>\n\n\n\n<li><a href=\"#h-more-features\">More Features<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#h-php-8-overall-performance-benchmarks\">PHP 8.0 Overall Performance Benchmarks<\/a><\/li>\n\n\n\n<li><a href=\"#h-does-your-application-support-it\">Does your Application Support it?<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#h-wordpress-php-8-usage-stats\">WordPress PHP 8.0 Usage Stats<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#h-how-to-upgrade-to-php-8\">How to Upgrade to PHP 8.0<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading h3\" id=\"h-php-8-0-for-all-fastcomet-users\">PHP 8.0 for all FastComet Users<\/h2>\n\n\n\n<p>PHP 8.0 is now available on all FastComet shared servers and can easily be selected via the FastComet PHP Selector. PHP 8.0 is the fastest version of PHP yet, so we recommend upgrading if your site is fully compatible with it. Naturally, keep in mind that some plugins may not be ready for the new version yet. That\u2019s why you should check your website thoroughly after switching to PHP 8.0.<\/p>\n\n\n\n<p>As we mentioned in our previous post regarding <a href=\"https:\/\/www.fastcomet.com\/blog\/php-7-4-available\" target=\"_blank\" rel=\"noreferrer noopener\">PHP 7.4<\/a>, PHP 8.0 is a significant milestone. One of the reasons is the introduction to JIT \u2014 a management strategy that aligns raw-material orders from suppliers directly with production schedules. A program is being compiled on the fly into a form that\u2019s usually faster, typically the host CPU\u2019s native instruction set. To do this, the JIT compiler uses its access to dynamic runtime information. A standard compiler does not have the ability to perform this task.<\/p>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-php-7-4-is-now-selected-as-the-default-php-version-for-new-accounts\">PHP 7.4 is Now Selected as the Default PHP Version for New Accounts<\/h3>\n\n\n\n<p>From yesterday forward all new shared hosting accounts with us will be shipped with 7.4 by default. This upgrade will enhance the efficiency of the platform for hosting PHP websites, thanks to the benefits of 7.4. Of course, in case of any issues or incompatibilities, customers have the option to downgrade their version.<\/p>\n\n\n\n<p>We are not yet setting PHP 8.0 as the default version on our shared hosting servers, mainly because there are still plugins, themes, etc., that may not be fully compatible with it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-existing-accounts-should-best-perform-the-switch-manually\">Existing Accounts Should Best Perform the Switch Manually<\/h3>\n\n\n\n<p>All existing shared hosting account versions higher than 5.6 will remain unaffected and unchanged. Of course, for all of them, the upgrade to 7.4 or to 8.0&nbsp; is just a click away.<\/p>\n\n\n\n<p>We understand that managing the whole upgrade to a new version can be complex and may require your investment in the additional development effort. In order to provide you with enough time to ensure compatibility, we&#8217;ve implemented protective and preventative measures to extend PHP 5.6, 7.0, and 7.1 continuity on our platform past their December 2018 EOL date.<\/p>\n\n\n\n<p>We advise all clients with Cloud VPS and Dedicated Server accounts to make the switch to the latest stable version of the scripting language.<\/p>\n\n\n\n<p>Of course, you don\u2019t have to install PHP 7.3 on your own. You can always request our expert Linux admins to perform the upgrade for you. They are available 24\/7 for your convenience and will make sure your request is answered and processed swiftly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading h3\" id=\"h-what-are-the-php-8-0-improvements-and-features\">What are the PHP 8.0 Improvements and Features?<\/h2>\n\n\n\n<p>Let&#8217;s start with all-new features.<\/p>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-union-types\">Union Types<\/h3>\n\n\n\n<p>Given the dynamically typed nature of PHP, there are many cases where union types can be useful. Union types are a collection of two or more types that indicate you can use either one of those.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public function foo(Foo|Bar $input): int|float;<\/pre>\n\n\n\n<p>Note that <code>void<\/code> can never be part of a union type since it indicates &#8220;no return value at all.\u201d Furthermore, <code>nullable<\/code> unions can be written using <code>|null<\/code>, or by using the existing <code>?<\/code> notation:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public function foo(Foo|null $foo): void;<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">public function bar(?Bar $bar): void<\/pre>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-just-in-time-jit\">Just in Time (JIT)<\/h3>\n\n\n\n<p>&#8220;JIT&#8221; stands for &#8220;just-in-time.\u201d PHP is an interpreted language, meaning that it&#8217;s not compiled like a C, Java, or Rust program. Instead, it is translated to machine code \u2014\u2009things that the CPU understands\u2009\u2014 at runtime.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>&#8220;JIT&#8221; is a technique that will compile parts of the code at runtime so that the compiled version can be used instead.<\/p>\n<\/blockquote>\n\n\n\n<p>Think of it as a &#8220;cached version&#8221; of the interpreted code generated at runtime.<\/p>\n\n\n\n<p>There&#8217;s a &#8220;monitor&#8221; that will look at the code as it&#8217;s running. When this monitor detects parts of your code that are re-executed, it will mark those parts as &#8220;warm&#8221; or &#8220;hot,\u201d depending on the frequency. Hot parts can be compiled as optimized machine code and used on the fly instead of the real code.<\/p>\n\n\n\n<p>It&#8217;s enough to understand that a JIT compiler may significantly improve your program\u2019s performance, but it&#8217;s a difficult thing to get right.<\/p>\n\n\n\n<p>Knowing that the JIT compiler tries to identify hot parts of your code, you can see why it impacts the fractal example. There is a lot of the same calculations happening over and over again. However, since PHP is most often used in a web context, we should also measure the JIT&#8217;s impact there.<\/p>\n\n\n\n<p>JIT opens the door for PHP to be used as a very performant language outside of the web. Additionally, it can be improved upon over time, which would also improve the code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-named-arguments\">Named Arguments<\/h3>\n\n\n\n<p>Named arguments allow you to pass in values to a function by specifying the value name so that you don&#8217;t have to consider their order, and you can also skip optional parameters!<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">function foo(string $a, string $b, ?string $c = null, ?string $d = null)&nbsp;<br>{ \/* \u2026 *\/ }<br>foo(<br>&nbsp;&nbsp;&nbsp;&nbsp;b: 'value b',&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;a: 'value a',&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;d: 'value d',<br>);<\/pre>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-attributes\">Attributes<\/h3>\n\n\n\n<p>Attributes, commonly known as annotations in other languages, offer a way to add metadata to classes without parsing docblocks.<\/p>\n\n\n\n<p>As for a quick look, here&#8217;s an example of what attributes look like from the RFC:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">use App\\Attributes\\ExampleAttribute;<br>#[ExampleAttribute]<br>class Foo<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;#[ExampleAttribute]<br>&nbsp;&nbsp;&nbsp;&nbsp;public const FOO = 'foo';<br>&nbsp;&nbsp;&nbsp;&nbsp;#[ExampleAttribute]<br>&nbsp;&nbsp;&nbsp;&nbsp;public $x;<br>&nbsp;&nbsp;&nbsp;&nbsp;#[ExampleAttribute]<br>&nbsp;&nbsp;&nbsp;&nbsp;public function foo(#[ExampleAttribute] $bar) { }<br>}<br><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">#[Attribute]<br>class ExampleAttribute<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;public $value;<br>&nbsp;&nbsp;&nbsp;&nbsp;public function __construct($value)<br>&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;value = $value;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<\/pre>\n\n\n\n<p>Note that this base <code>Attribute<\/code> used to be called <code>PhpAttribute<\/code> in the original RFC but was changed with another RFC afterward.<\/p>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-match-expression\">Match Expression<\/h3>\n\n\n\n<p>You could call it the big brother of the switch expression: match can return values, doesn&#8217;t require break statements, can combine conditions, uses strict type comparisons, and doesn&#8217;t do any type of coercion.<\/p>\n\n\n\n<p>It looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$result = match($input) {<br>&nbsp;&nbsp;&nbsp;&nbsp;0 =&gt; \"hello\",<br>&nbsp;&nbsp;&nbsp;&nbsp;'1', '2', '3' =&gt; \"world\",<br>};<\/pre>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-constructor-property-promotion\">Constructor Property Promotion<\/h3>\n\n\n\n<p>This RFC adds syntactic sugar to create value objects or data transfer objects. Instead of specifying class properties and a constructor for them, PHP can now combine them into one.<\/p>\n\n\n\n<p>Instead of doing this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">class Money<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;public Currency $currency;<br>&nbsp;&nbsp;&nbsp;&nbsp;public int $amount;<br>&nbsp;&nbsp;&nbsp;&nbsp;public function __construct(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Currency $currency,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int $amount,<br>&nbsp;&nbsp;&nbsp;&nbsp;) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;currency = $currency;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;amount = $amount;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<\/pre>\n\n\n\n<p>You can now do this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">class Money<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;public function __construct(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Currency $currency,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public int $amount,<br>&nbsp;&nbsp;&nbsp;&nbsp;) {}<br>}<\/pre>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-new-static-return-type\">New <code>static<\/code> Return Type<\/h3>\n\n\n\n<p>While it was already possible to return <code>self<\/code>, <code>static<\/code> wasn&#8217;t a valid return type until PHP 8.0. Given PHP&#8217;s dynamically typed nature, it&#8217;s a feature that will be useful to many developers.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">class Foo<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;public function test(): static<br>&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return new static();<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<\/pre>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-throw-expression\">Throw Expression<\/h3>\n\n\n\n<p>This RFC changes <code>throw<\/code> from being a statement to being an expression, which makes it possible to throw exception in many new places:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$triggerError = fn () =&gt; throw new MyError();\n\n$foo = $bar['offset'] ?? throw new OffsetDoesNotExist('offset');<\/pre>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-inheritance-with-private-methods\">Inheritance with Private Methods<\/h3>\n\n\n\n<p>Previously, PHP used to apply the same inheritance checks on public, protected, and private methods. In other words: private methods should follow the same method signature rules as protected and public methods. This doesn&#8217;t make sense since private methods won&#8217;t be accessible by child classes.<\/p>\n\n\n\n<p>This RFC changed that behavior so that these inheritance checks are not performed on private methods anymore. Furthermore, the use of the <code>final private function<\/code> also didn&#8217;t make sense, so doing so will now trigger a warning:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Warning: Private methods cannot be final as they are never overridden by other classes<\/pre>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-weak-maps\">Weak Maps<\/h3>\n\n\n\n<p>Built upon the weakrefs RFC added in PHP 7.4, a <code>WeakMap<\/code> implementation is added in PHP 8.0. <code>WeakMap<\/code> holds references to objects, which don&#8217;t prevent those objects from being garbage collected.<\/p>\n\n\n\n<p>Take the example of ORMs. They often implement caches that hold references to entity classes to improve the performance of relations between entities. These entity objects can not be garbage collected as long as this cache has a reference to them, even if the cache is the only thing referencing them.<\/p>\n\n\n\n<p>If this caching layer uses weak references and maps instead, PHP will garbage collect these objects when nothing else references them anymore. Especially in the case of ORMs, which can manage several hundred, if not thousands of entities within a request, weak maps can offer a better, more resource-friendly way of dealing with these objects.<\/p>\n\n\n\n<p>Here&#8217;s what weak maps look like, an example from the RFC:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">class Foo<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;private WeakMap $cache;<br>&nbsp;&nbsp;&nbsp;&nbsp;public function getSomethingWithCaching(object $obj): object<br>&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $this-&gt;cache[$obj]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;??= $this-&gt;computeSomethingExpensive($obj);<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<\/pre>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-allowing-class-on-objects\">Allowing <code>::class<\/code> on Objects<\/h3>\n\n\n\n<p>A small, yet useful, new feature: it&#8217;s now possible to use <code>::class<\/code> on <code>objects<\/code>, instead of having to use <code>get_class()<\/code> on them. It works the same way as <code>get_class()<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$foo = new Foo();<br><br>var_dump($foo::class);<\/pre>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-more-features\">More Features<\/h3>\n\n\n\n<p>PHP 8.0 comes with a lot more new features, which we will list below:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>New <code>mixed<\/code> type;<\/li>\n\n\n\n<li>Non-capturing catches;<\/li>\n\n\n\n<li>Trailing comma in <code>parameter<\/code> lists;<\/li>\n\n\n\n<li>Create DateTime Objects from Interface;<\/li>\n\n\n\n<li>New stringable Interface;<\/li>\n\n\n\n<li>The <code>nullsafe<\/code> Operator<\/li>\n\n\n\n<li>New <code>str_contains()<\/code> Function;<\/li>\n\n\n\n<li>New <code>str_starts_with()<\/code> and <code>str_ends_with()<\/code> functions;<\/li>\n\n\n\n<li>New <code>fdiv()<\/code> function;<\/li>\n\n\n\n<li>New <code>get_debug_type()<\/code> Function;<\/li>\n\n\n\n<li>New <code>get_resource_id()<\/code> Function;<\/li>\n\n\n\n<li>Abstract methods in traits improvements;<\/li>\n\n\n\n<li>Object implementation of <code>token_get_all()<\/code>;<\/li>\n\n\n\n<li>Type annotations for internal functions externals;<\/li>\n\n\n\n<li><code>ext-json<\/code> always available.<\/li>\n<\/ul>\n\n\n\n<p>You can visit <a href=\"https:\/\/www.php.net\/releases\/8.0\/en.php\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">the official source<\/a> for some thorough information about the new major PHP update.<\/p>\n\n\n\n<h2 class=\"wp-block-heading h3\" id=\"h-php-8-0-overall-performance-benchmarks\">PHP 8.0 Overall Performance Benchmarks<\/h2>\n\n\n\n<p>With the major PHP 8.0 release, new features keep coming, and the programming language\u2019s performance continues to evolve.<\/p>\n\n\n\n<p>According to Phoronix benchmarks, PHP 8.0 continues to improve in terms of performance.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/m6w9ixRwnSkI_YKTDsxPJFiucCbt3t350xtNB25ml-W2eTqj6zB6LkEFmN9-AN-3BzlQbh6YUElNGkn684LajQDPvPFEokWulS0h1q-0Iq4hI9RNQwUtalxqISzvqoPByKZRgUl0\" alt=\"PHP Phoronix Benchmarks\"\/><figcaption class=\"wp-element-caption\">Source: <a href=\"http:\/\/phoronix.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Phoronix.com<\/a><\/figcaption><\/figure>\n\n\n\n<p>According to the benchmark stats, PHP 7+ shows improved memory usage, in addition to some other enhancements. As expected, PHP 8.0 is looking to be the fastest stable release yet.<\/p>\n\n\n\n<h2 class=\"wp-block-heading h3\" id=\"h-does-your-application-support-it\">Does your Application Support it?<\/h2>\n\n\n\n<p>The great news is that most web applications, including WordPress, fully work on PHP 8.0:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.fastcomet.com\/blog\/wordpress-5-7\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress 5.7<\/a>;<\/li>\n\n\n\n<li>Joomla! 3.9.26;<\/li>\n\n\n\n<li>Laravel 6, 7, and 8;<\/li>\n\n\n\n<li>Symfony 5.2;<\/li>\n\n\n\n<li>CodeIgniter 4;<\/li>\n\n\n\n<li>CakePHP 4.1;<\/li>\n\n\n\n<li>PyroCMS 3.9;<\/li>\n\n\n\n<li>Bolt 3.7.2;<\/li>\n\n\n\n<li>ExpressionEngine 5.3.0.<\/li>\n<\/ul>\n\n\n\n<p>As for Magento, the Magento community has begun its mission to make the Magento 2 PHP 8.0 compatible with the launch of the <a href=\"https:\/\/community.magento.com\/t5\/Magento-DevBlog\/Magento-PHP-8-Compatibility-Community-Project\/ba-p\/464983\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Magento PHP 8.0 Compatibility Community Project<\/a>.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading h4\" id=\"h-wordpress-php-8-0-usage-stats\">WordPress PHP 8.0 Usage Stats<\/h3>\n\n\n\n<p>With its release, WordPress 5.7 already had better compatibility with PHP 8.<\/p>\n\n\n\n<p>Here is the percentage of PHP versions used with WordPress, as also shown in the pie chart below (according to <a href=\"https:\/\/wordpress.org\/about\/stats\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress.org<\/a>):<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PHP 8.0: 0.3%;<\/li>\n\n\n\n<li>PHP 7.4: 27.3%;<\/li>\n\n\n\n<li>PHP 7.3: 29.1%;<\/li>\n\n\n\n<li>PHP 7.2: 18.4%;<\/li>\n\n\n\n<li>PHP 7.1: 4.5%<\/li>\n\n\n\n<li>PHP 7.0: 5.9%<\/li>\n\n\n\n<li>PHP 5.6: 9.8%;<\/li>\n\n\n\n<li>PHP 5.5: 1%;<\/li>\n\n\n\n<li>PHP 5.4: 1.6%;<\/li>\n\n\n\n<li>PHP 5.3: 1.4%;<\/li>\n\n\n\n<li>PHP 5.2: 0.6%;<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"802\" src=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/04\/PHP-Versions-WordPress-272021.png\" alt=\"WordPress PHP Versions\" class=\"wp-image-6312\" srcset=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/04\/PHP-Versions-WordPress-272021.png 1024w, https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/04\/PHP-Versions-WordPress-272021-300x235.png 300w, https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/04\/PHP-Versions-WordPress-272021-768x602.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Unfortunately, PHP 5 is still used by 14.4% of all sites with a known server-side programming language. However, those stats are much better than a year ago, which could be due to the <a href=\"https:\/\/www.fastcomet.com\/blog\/site-health-score-in-wordpress-5-2\" target=\"_blank\" rel=\"noreferrer noopener\">Site Health<\/a> feature that reminds users to update their PHP version.<\/p>\n\n\n\n<p>It\u2019s encouraging that more than 50% of the WordPress websites are running on <a href=\"https:\/\/www.fastcomet.com\/blog\/php-7-3-available\" target=\"_blank\" rel=\"noreferrer noopener\">PHP 7.3<\/a> and above.<\/p>\n\n\n\n<p>We recommend that you ask your host for a supported PHP version. \u0422he best choice would be a release that is WordPress approved. As of the time this article is posted, the WordPress requirements are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PHP version 7.4 or greater;<\/li>\n\n\n\n<li>MariaDB version 10.1 or greater;<\/li>\n\n\n\n<li>HTTPS support;<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading h3\" id=\"h-how-to-upgrade-to-php-8-0\">How to Upgrade to PHP 8.0<\/h2>\n\n\n\n<p>With FastComet\u2019s shared hosting servers, you have the convenient option to <a href=\"https:\/\/www.fastcomet.com\/tutorials\/cpanel\/php-version\" target=\"_blank\" rel=\"noreferrer noopener\">select your PHP version<\/a> quickly and easily. All you have to do is:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to your to <a href=\"https:\/\/my.fastcomet.com\" target=\"_blank\" rel=\"noreferrer noopener\">Client Area<\/a> \u2192 cPanel \u2192 Select PHP Version:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/TO5ZSqPZab2SqcNLDjUSUS5paDQjlpltGGqqucFKDX9pH3psRAHrFf-AyodirboQnWUrNwW6ucRNeO993BZMAslWfH97dVYWRjs9NEQOExBzQmSoinFz7PXjGbs-mhGXEyHJy0--\" alt=\"Find PHP Selector in cPanel\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In the PHP Selector, click on the drop-down:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"525\" src=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/04\/choose-php-8-in-cpanel.png\" alt=\"Choose PHP Version in PHP Selector\" class=\"wp-image-6310\" srcset=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/04\/choose-php-8-in-cpanel.png 1024w, https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/04\/choose-php-8-in-cpanel-300x154.png 300w, https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/04\/choose-php-8-in-cpanel-768x394.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Then, click on Set as Current:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"232\" src=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/04\/set-php-8-as-current-in-cpanel.png\" alt=\"Set PHP 8 as Current PHP Version\" class=\"wp-image-6311\" srcset=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/04\/set-php-8-as-current-in-cpanel.png 1024w, https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/04\/set-php-8-as-current-in-cpanel-300x68.png 300w, https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/04\/set-php-8-as-current-in-cpanel-768x174.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Done!<\/li>\n<\/ul>\n\n\n\n<p>When switching between different PHP versions, remember to check your project compatibility before beginning the transition.<\/p>\n\n\n\n<h2 class=\"wp-block-heading h3\" id=\"h-final-words\">Final Words<\/h2>\n\n\n\n<p>We\u2019ve covered all the PHP 8.0 key changes and improvements. The most significant addition is surely the JIT compiler, but that doesn\u2019t mean everything else that comes with this major PHP version is not important.&nbsp;<\/p>\n\n\n\n<p>Feel free to share in the comments which of the PHP 8.0 changes and improvements you like the most, or perhaps what you dislike. Happy Coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The major PHP 8 release is here on the FastComet servers. Although it was officially released for General Availability on November 26, 2020, it is now fully available for all FastComet customers. After our extensive testing and monitoring, to guarantee complete compatibility of the integration with cPanel and our infrastructure, we can confidently state that [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":6303,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,4726],"tags":[4630,42,103,4629],"class_list":["post-6304","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-optimization","category-service-updates","tag-jit","tag-opensource","tag-php","tag-php-8"],"featured_image_src":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/03\/php8.png","author_info":{"display_name":"Joseph","author_link":"https:\/\/www.fastcomet.com\/blog\/author\/joseph"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP 8 is Now Available at FastComet Platform | FastComet<\/title>\n<meta name=\"description\" content=\"Learn what&#039;s new in PHP 8.0, how to start using it on your FastComet hosting account, and what improvements to expect from the new version.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.fastcomet.com\/blog\/php-8-0-available\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP 8 is Now Available at FastComet Platform | FastComet\" \/>\n<meta property=\"og:description\" content=\"Learn what&#039;s new in PHP 8.0, how to start using it on your FastComet hosting account, and what improvements to expect from the new version.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fastcomet.com\/blog\/php-8-0-available\" \/>\n<meta property=\"og:site_name\" content=\"FastComet Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-20T14:37:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-17T19:03:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/03\/php8.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"620\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Joseph\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Joseph\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP 8 is Now Available at FastComet Platform | FastComet","description":"Learn what's new in PHP 8.0, how to start using it on your FastComet hosting account, and what improvements to expect from the new version.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.fastcomet.com\/blog\/php-8-0-available","og_locale":"en_US","og_type":"article","og_title":"PHP 8 is Now Available at FastComet Platform | FastComet","og_description":"Learn what's new in PHP 8.0, how to start using it on your FastComet hosting account, and what improvements to expect from the new version.","og_url":"https:\/\/www.fastcomet.com\/blog\/php-8-0-available","og_site_name":"FastComet Blog","article_published_time":"2021-04-20T14:37:07+00:00","article_modified_time":"2025-12-17T19:03:20+00:00","og_image":[{"width":1024,"height":620,"url":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/03\/php8.png","type":"image\/png"}],"author":"Joseph","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Joseph","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.fastcomet.com\/blog\/php-8-0-available","url":"https:\/\/www.fastcomet.com\/blog\/php-8-0-available","name":"PHP 8 is Now Available at FastComet Platform | FastComet","isPartOf":{"@id":"https:\/\/www.fastcomet.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fastcomet.com\/blog\/php-8-0-available#primaryimage"},"image":{"@id":"https:\/\/www.fastcomet.com\/blog\/php-8-0-available#primaryimage"},"thumbnailUrl":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/03\/php8.png","datePublished":"2021-04-20T14:37:07+00:00","dateModified":"2025-12-17T19:03:20+00:00","author":{"@id":"https:\/\/www.fastcomet.com\/blog\/#\/schema\/person\/4f2c9600f49c872b8d56996ee3b95035"},"description":"Learn what's new in PHP 8.0, how to start using it on your FastComet hosting account, and what improvements to expect from the new version.","breadcrumb":{"@id":"https:\/\/www.fastcomet.com\/blog\/php-8-0-available#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fastcomet.com\/blog\/php-8-0-available"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fastcomet.com\/blog\/php-8-0-available#primaryimage","url":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/03\/php8.png","contentUrl":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2021\/03\/php8.png","width":1024,"height":620,"caption":"PHP 8 Available at FastComet"},{"@type":"BreadcrumbList","@id":"https:\/\/www.fastcomet.com\/blog\/php-8-0-available#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.fastcomet.com\/blog"},{"@type":"ListItem","position":2,"name":"PHP 8.0 Deployed on FastComet (What\u2019s New)"}]},{"@type":"WebSite","@id":"https:\/\/www.fastcomet.com\/blog\/#website","url":"https:\/\/www.fastcomet.com\/blog\/","name":"FastComet Blog","description":"FastComet Web Hosting Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.fastcomet.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.fastcomet.com\/blog\/#\/schema\/person\/4f2c9600f49c872b8d56996ee3b95035","name":"Joseph","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fastcomet.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1aa84dc2a6398ed73c957bd1de58806d12d44e2956744ed1ae9b435d57822ab7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1aa84dc2a6398ed73c957bd1de58806d12d44e2956744ed1ae9b435d57822ab7?s=96&d=mm&r=g","caption":"Joseph"},"description":"Joseph is part of the FastComet Marketing team. With years of content writing experience behind him, it's one of his favorite activities. Joseph takes part in the SEO of the FastComet website and blog. His goal is to write comprehensive posts and guides, always aiming to help our clients with essential information. Joseph also has a thirst for knowledge and improvement, which makes the hosting environment a perfect place for him.","sameAs":["https:\/\/www.fastcomet.com\/"],"url":"https:\/\/www.fastcomet.com\/blog\/author\/joseph"}]}},"_links":{"self":[{"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/posts\/6304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/comments?post=6304"}],"version-history":[{"count":16,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/posts\/6304\/revisions"}],"predecessor-version":[{"id":10987,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/posts\/6304\/revisions\/10987"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/media\/6303"}],"wp:attachment":[{"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/media?parent=6304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/categories?post=6304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/tags?post=6304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}