{"id":9454,"date":"2024-02-06T15:26:19","date_gmt":"2024-02-06T15:26:19","guid":{"rendered":"https:\/\/www.fastcomet.com\/blog\/?p=9454"},"modified":"2024-02-07T07:19:51","modified_gmt":"2024-02-07T07:19:51","slug":"php-8-3-arrives-to-fastcomet","status":"publish","type":"post","link":"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet","title":{"rendered":"PHP 8.3 Arrives To FastComet"},"content":{"rendered":"\n<p class=\"has-drop-cap\">If you have been our customer for a while, you know that we always strive to provide fast, secure, and contemporary services. That implies keeping both the hardware and software we use and offer to our customers as up-to-date as possible. One piece of software had been missing from our hosting services for a few months, but we are happy to say that has been remedied. PHP 8.3 is now available for all our hosting services. It was initially released in November of 2023. Since then, we have eagerly awaited CloudLinux to make it available for their operating systems. They recently released it, thus PHP 8.3 is now available for all our customers!<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>While the name might lead you to believe it is a minor release, some of its changes are not minor at all. Several significant changes could impact the way you write code for the better. Such improvements are never minor or insignificant. Without further ado, here are all the changes, additions, and enhancements that PHP 8.3 brings.<\/p>\n\n\n<div class=\"wp-block-ub-table-of-contents-block ub_table-of-contents\" id=\"ub_table-of-contents-2cecc1e4-4751-4957-87a1-7b6682559f10\" data-linktodivider=\"false\" data-showtext=\"show\" data-hidetext=\"hide\" data-scrolltype=\"auto\" data-enablesmoothscroll=\"false\" data-initiallyhideonmobile=\"false\" data-initiallyshow=\"true\"><div class=\"ub_table-of-contents-header-container\" style=\"\">\n\t\t\t<div class=\"ub_table-of-contents-header\" style=\"text-align: left; \">\n\t\t\t\t<div class=\"ub_table-of-contents-title\">In This Blog Post You Will Find:<\/div>\n\t\t\t\t\n\t\t\t<\/div>\n\t\t<\/div><div class=\"ub_table-of-contents-extra-container\" style=\"\">\n\t\t\t<div class=\"ub_table-of-contents-container ub_table-of-contents-1-column \">\n\t\t\t\t<ul style=\"\"><li style=\"\"><a href=\"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#0-typed-class-constants\" style=\"\">Typed Class Constants<\/a><\/li><li style=\"\"><a href=\"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#1-new-function-json_validate-\" style=\"\">New Function: json_validate()<\/a><\/li><li style=\"\"><a href=\"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#2-new-methods\" style=\"\">New Methods<\/a><ul><li style=\"\"><a href=\"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#3-getbytesfromstring-\" style=\"\">getBytesFromString()<\/a><\/li><li style=\"\"><a href=\"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#4-getfloat-and-nextfloat-\" style=\"\">getFloat() and nextFloat()<\/a><\/li><\/ul><\/li><li style=\"\"><a href=\"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#5-dynamic-fetching-for-class-constants-and-enum-members\" style=\"\">Dynamic Fetching for Class Constants and Enum Members<\/a><\/li><li style=\"\"><a href=\"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#6-new-attribute-override\" style=\"\">New Attribute: #[\\Override]<\/a><\/li><li style=\"\"><a href=\"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#7-smaller-additions-and-deprecations\" style=\"\">Smaller Additions and Deprecations<\/a><\/li><li style=\"\"><a href=\"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#8-conclusion\" style=\"\">Conclusion<\/a><\/li><\/ul>\n\t\t\t<\/div>\n\t\t<\/div><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"0-typed-class-constants\">Typed Class Constants<\/h2>\n\n\n\n<p>Ever since PHP 7.3 the ability to declare class properties has been available to the public. However, it had one <a href=\"https:\/\/wiki.php.net\/rfc\/typed_class_constants\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">major drawback<\/a>: class constants could never declare a type. That was not an issue with global constants, but it could lead to confusion and even bugs regarding class constants. After years of development, though, PHP 8.3 allows us to assign a type to a class constant. Fitting that this changes comes precisely one major release after the community identified the issue.<\/p>\n\n\n\n<p>Assigning a type, or <strong>typing <\/strong>\u2013 not to be confused with writing on a keyboard, should make it easier for PHP developers to find consistency when working with class constants. Typing will apply to all class constants, including <em>interface<\/em>, <em>trait<\/em>, and <em>enum<\/em>. What this will do for class constants is ensure that child classes that override such class constants or assign new values to them also don\u2019t change the type of the constant on a whim. When a class constant is declared with a type, PHP will now enforce the type on the declaration itself and all consequent subclasses. Previously, changing the type of constant would make it incompatible with the declaration, leading to a fatal error.<\/p>\n\n\n\n<p>Here is a very basic example that will show the functionality we have explained more clearly. We are using an <em>interface<\/em> constant.<\/p>\n\n\n\n<pre>\/\/ Legal:\n\ninterface FastCometTest {\n\n\u00a0\u00a0\u00a0\u00a0\/\/ Both the declared type and value are strings\n\n\u00a0\u00a0\u00a0\u00a0const string VERSION = \"PHP 8.3\";\n\n}<\/pre>\n\n\n\n<p>And an example where the code will not work.<\/p>\n\n\n\n<pre>\n\/\/ Illegal:\n\ninterface FastCometTest {\n\n\u00a0\u00a0\u00a0\u00a0\/\/ The type and value are mismatched in this declaration\n\n\u00a0\u00a0\u00a0\u00a0const float VERSION = \"PHP 8.3\";\n\n}<\/pre>\n\n\n\n<p>Keep in mind that the actual value of the typed class constant is revealed only when working with classes derived from the base declaration. That is why we mentioned this update will help with child classes occasionally changing the type of the constant. Here is an example that demonstrates what we described.<\/p>\n\n\n\n<pre>class FastCometTest {\n\n\u00a0\u00a0\u00a0\u00a0const string VERSION = \"PHP 8.2\";\n\n}\n\nclass MyConstTest extends FastCometTest {\n\n\u00a0\u00a0\u00a0\u00a0\/\/ Legal:\n\n\u00a0\u00a0\u00a0\u00a0\/\/It\u2019s fine to alter the value of VERSION here\n\n\u00a0\u00a0\u00a0\u00a0const string VERSION = \"PHP 8.3\";\n\n\u00a0\u00a0\u00a0\u00a0\/\/ Illegal:\n\n\u00a0\u00a0\u00a0\u00a0\/\/ Since the type was specified in the base class, it must also be declared\n\n\u00a0\u00a0\u00a0\u00a0const VERSION = \"PHP 8.3\";\n\n\u00a0\u00a0\u00a0\u00a0\/\/ Illegal:\n\n\u00a0\u00a0\u00a0\u00a0\/\/ The type that was declared in the base class can\u2019t be altered despite the new type and its\u00a0\u00a0\u00a0\u00a0\n\n\u00a0\u00a0\u00a0\/\/ value being compatible\n\n\u00a0\u00a0\u00a0\u00a0const float VERSION = 8.3;\n\n}<\/pre>\n\n\n\n<p>As you can see from the explanations within the code itself, subclasses must now follow specific rules. Finally, when working with multiple class types, it is possible to narrow the class type when working with multiple ones. Such a variation is safe as long as it is compatible with the main type. Here is an example.<\/p>\n\n\n\n<pre>class FastCometTest{\n\n\u00a0\u00a0\u00a0\u00a0const string|float VERSION = \"PHP 8.2\";\n\n}\n\nclass MyConstTest extends FastCometTest{\n\n\u00a0\u00a0\u00a0\u00a0\/\/ Legal:\n\n\u00a0\u00a0\u00a0\u00a0\/\/ Narrowing the type declaration to string or float is fine here\n\n\u00a0\u00a0\u00a0\u00a0const string VERSION = \"PHP 8.3\";\n\n\u00a0\u00a0\u00a0\u00a0const float VERSION = 8.3;\n\n\u00a0\u00a0\u00a0\u00a0\/\/ Legal:\n\n\u00a0\u00a0\u00a0\u00a0\/\/ Value is compatible with float despite being an int\u00a0\n\n\u00a0\u00a0\u00a0\u00a0const float VERSION = 8;\n\n\u00a0\u00a0\u00a0\u00a0\/\/ Illegal:\n\n\u00a0\u00a0\u00a0\u00a0\/\/ In the example below, the type options can\u2019t be widened to include int\n\n\u00a0\u00a0\u00a0\u00a0const string|float|int VERSION = 8;\n\n}<\/pre>\n\n\n\n<p>As you can see from the example, as long as at least one of the types aligns with the main class constraint type, the code will work fine.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"1-new-function-json_validate-\">New Function: <em>json_validate()<\/em><\/h2>\n\n\n\n<p>When working with any code, it is vital to make sure it is syntactically sound before trying to execute it, integrate it with other scripts, pass it as an argument to a function, or do anything else in general. That is why having the correct tools to check the syntax for you is essential, especially if you are learning to write code or are unfamiliar with what you are putting together.&nbsp;<\/p>\n\n\n\n<p>Fortunately, a new function in PHP 8.3 allows you to validate a JSON payload without using a well-known workaround. Previously, developers used the <em>json_decode() <\/em>function to check for errors. The function turned the JSON data into associative arrays and objects. That process itself could be taxing on a system\u2019s memory. It was a suboptimal solution.<\/p>\n\n\n\n<p>The new <em>json_validate()<\/em> function in PHP 8.3 is a much more elegant way to check your JSON code for errors. It uses less memory than <em>json_decode()<\/em>, and since it is a dedicated function, it also does not require any roundabout coding. Of course, that is not to say that the <em>json_decode()<\/em> function is now useless. You can still use it to check the validity of the code if you intend to use the arrays and objects it creates. If you are just checking, though, using <em>json_validate() <\/em>is far more efficient. Below is a quick example of the new function.<\/p>\n\n\n\n<pre>if (json_validate($checkJSON)) {\n\n\u00a0\u00a0\u00a0\u00a0\/\/ Perform intended task with $checkJSON\u00a0\u00a0\u00a0\n\n}<\/pre>\n\n\n\n<p>Finally, the new function is capable of accepting <em>$flags<\/em>, but for now, there is only one that will work with it: <em>JSON_INVALID_UTF8_IGNORE<\/em>. The developers of PHP may add more in future versions. You can add the flag to the function like any other.<\/p>\n\n\n\n<pre>if (json_validate($checkJSON , flags: JSON_INVALID_UTF8_IGNORE)) {\n\n\u00a0\u00a0\u00a0\u00a0\/\/ Perform intended task with $checkJSON\u00a0\u00a0\u00a0\n\n}<\/pre>\n\n\n\n<p>The <em>json_validate()<\/em> function is terrific if you only want to check your JSON payload instead of using the more memory-intensive <em>json_decode()<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2-new-methods\">New Methods<\/h2>\n\n\n\n<p>Next up in the list of additions that come with PHP 8.3 are three new methods: <em>getBytesFromString(), getFloat(), <\/em>and <em>nextFloat()<\/em>. The Randomizer class can use these methods to generate specific random outputs. <em>getBytesFromString() <\/em>will create a random alphanumeric string out of pre-approved characters. Developers, on the other hand, can use <em>getFloat() <\/em>and <em>nextFloat()<\/em> to generate random float values. Let\u2019s start with some random strings!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-getbytesfromstring-\"><strong>getBytesFromString()<\/strong><\/h3>\n\n\n\n<p>While this new method is straightforward, the functionality is undeniably useful. Pass it a string of characters as the source material, specify how many you want the code to use, and it will spit out a random arrangement of those characters. The method selects bytes at random until it has reached the quota. Here is a quick example.<\/p>\n\n\n\n<pre>$rando = new Random\\Randomizer();\n\n$alpha = 'ABCDEFGHJKMNPQRSTVWXYZ';\n\n$rando->getBytesFromString($alpha, 9); \/\/ \"MGQFHWXYJ\"\n\n$rando->getBytesFromString($alpha, 11); \/\/ \"PLKVNRSEUIO\"\n\n$rando->getBytesFromString($alpha, 4); \/\/ \"DAZB\"<\/pre>\n\n\n\n<p>As you can see, we invoke the <em>Randomizer<\/em> class, provide it with the string of characters we want it to use, and then execute. We request six characters each time, and we get six random ones. Here is a different example with numbers.<\/p>\n\n\n\n<pre>$rando = new Random\\Randomizer();\n\n$nums = '1234567890';\n\n$rando->getBytesFromString($nums, 9); \/\/ \"725193804\"\n\n$rando->getBytesFromString($nums, 11); \/\/ \"62815730943\"\n\n$rando->getBytesFromString($nums, 4); \/\/ \"5281\"<\/pre>\n\n\n\n<p>As you can see from this example, we don\u2019t have to stay within the number of characters when deciding how many to request from the method. The string has only six, but we requested ten, and it provided them. Finally, you can use letters and numbers and weigh the outcome using a weighted string. The example below shows the method will select the more common symbols more often.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$rando = new Random\\Randomizer();\n\n$weighted = 'AAA1234567BBC';\n\n$rando-&gt;getBytesFromString($weighted, 6); \/\/ \"37AAB1\"\n\n$rando-&gt;getBytesFromString($weighted, 12); \/\/ \"47A1CAB5AB76\"<\/code><\/pre>\n\n\n\n<p>If you ever needed random strings of characters generated, the new <em>getBytesFromString()<\/em> method is precisely what you need.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-getfloat-and-nextfloat-\"><strong>getFloat() and nextFloat()<\/strong><\/h3>\n\n\n\n<p>Further expanding on the <em>Randomizer<\/em> class, the <em>getFloat() and nextFloat() <\/em>can create random float values out of a given range. We will focus on the former more because the latter has a singular purpose, which we will explain at the end of this section. They both work similarly, though.<\/p>\n\n\n\n<p>The <em>getFloat()<\/em> method takes a minimum and a maximum value and then returns a random float value from those two. Here is an example below that will illustrate that perfectly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$rando = new Random\\Randomizer();\n\n\/\/ This will generate a float value between a minimum&nbsp;\n\n\/\/ value of 0 and a maximum value of 9\n\n$rando-&gt;getFloat(0,9); \/\/ 5.3945744610617<\/code><\/pre>\n\n\n\n<p>We gave the method a range between 0 and 9, and it generated a random value for us. Simple, straightforward. Using one of these four parameters, you can further control what the model produces as a value.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>IntervalBoundary::ClosedOpen<\/strong> <strong>&#8211; <\/strong>The minimum value may be returned, but not the maximum;<\/li>\n\n\n\n<li><strong>IntervalBoundary::ClosedClosed &#8211;<\/strong> Both the minimum and maximum values may be returned;<\/li>\n\n\n\n<li><strong>IntervalBoundary::OpenClosed &#8211;<\/strong> The minimum value may not be returned, but the maximum value may be;<\/li>\n\n\n\n<li><strong>IntervalBoundary::OpenOpen &#8211; <\/strong>Neither the minimum nor the maximum values may be returned.<\/li>\n\n\n\n<li><\/li>\n<\/ul>\n\n\n\n<p>As you can see, each parameter will change how the method works. If you do not use these parameters, the default is <em>IntervalBoundary::ClosedOpen<\/em>. The method will generate a value that can include the minimum value but not the maximum. The <a href=\"https:\/\/www.php.net\/manual\/en\/random-randomizer.getfloat.php\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">PHP documentation<\/a> has an excellent example that we will show you here as well.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\n$randomizer = new \\Random\\Randomizer();\n\n\/\/ For the latitude, the value may be both -90 and 90.\n\n\/\/ For the longitude, the value may be 180, but not -180 because\n\n\/\/ -180 and 180 refer to the same longitude.\n\nprintf(\n\n&nbsp;&nbsp;&nbsp;&nbsp;\"Lat: %+.6f Lng: %+.6f\",\n\n&nbsp;&nbsp;&nbsp;&nbsp;$randomizer-&gt;getFloat(-90, 90, \\Random\\IntervalBoundary::ClosedClosed),\n\n&nbsp;&nbsp;&nbsp;&nbsp;$randomizer-&gt;getFloat(-180, 180, \\Random\\IntervalBoundary::OpenClosed),\n\n);\n\n?&gt;<\/code><\/pre>\n\n\n\n<p>As you can see from the comments in the code itself, the method can produce a latitude value that can be either the minimum or maximum value. The longitude can, on the other hand, not produce the minimum value.&nbsp;<\/p>\n\n\n\n<p>Finally, the <em>nextFloat()<\/em> method is very similar to <em>getFloat()<\/em>. Still, it can only produce a random float between 0 and less than 1. It has a more niche use, but it is straightforward to implement.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$rando = new Random\\Randomizer();\n\n$rando-&gt;nextFloat(); \/\/ 0.7984651324934<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"5-dynamic-fetching-for-class-constants-and-enum-members\">Dynamic Fetching for Class Constants and Enum Members<\/h2>\n\n\n\n<p>If you have been programming with PHP for a while you would be familiar with how convoluted fetching class constants and Enum members with variable names can be. You might have had to use something like the <em>constant()<\/em> function to achieve that. Perhaps something like this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class FastComet {\n\n&nbsp;&nbsp;&nbsp;&nbsp;public const THE_CONST = 9;\n\n}\n\nenum FastEnum: int {\n\n&nbsp;&nbsp;&nbsp;&nbsp;case InitialMember = 9;\n\n&nbsp;&nbsp;&nbsp;&nbsp;case SecondaryMember = 10;\n\n}\n\n$constantName = 'THE_CONST';\n\n$memberName = 'InitialMember';\n\necho constant('FastComet::' . $constantName);\n\necho constant('FastEnum::' . $memberName)-&gt;value;<\/code><\/pre>\n\n\n\n<p>Doesn\u2019t exactly accomplish the fetching in the most elegant way, does it? Fortunately, PHP 8.3 introduces <a href=\"https:\/\/wiki.php.net\/rfc\/dynamic_class_constant_fetch\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">dynamic fetching for class constants and Enum members<\/a>, so you no longer have to do that. More specifically, it introduces dynamic fetching constants that look something like this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$constantName = 'THE_CONST';\n\n$memberName = 'InitialMember';\n\necho FatComet::{$constantName};\n\necho FastEnum::{$memberName}-&gt;value;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"6-new-attribute-override\">New Attribute: #[\\Override]<\/h2>\n\n\n\n<p>The <em>#[\\Override]<\/em> attribute debuted in PHP 8.3, and it can save developers a lot of time troubleshooting and headaches. After adding the attribute to a class method, PHP will ensure that the class method in question overrides or implements a parent or interface method.&nbsp;<\/p>\n\n\n\n<p>When creating or implementing interfaces in PHP, developers can specify the exact functionality of that interface\u2019s methods. However, when creating a separate instance of a class \u2013 like a subclass \u2013 it is possible to override the parent method using the same name and a compatible signature in the child class. That usually works, but developers must be vigilant to ensure that there are no typos. That the subclass has not accidentally created a brand-new method.&nbsp;<\/p>\n\n\n\n<p>Now, developers can use the <em>#[\\Override]<\/em> attribute to specify that the method in question will have some lineage within the code. As we mentioned above, the method must be in some way connected to a parent. That should make things much more easy to read and understand as well. Here is a quick example of how a piece of code with this attribute would look like.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class FastComet {\n\n&nbsp;&nbsp;&nbsp;&nbsp;protected function ovrTest(): void {}\n\n}\n\n\/\/ Since ovrTest() can be found in the parent class, this will work\n\nclass CloudHosting extends FastComet {\n\n&nbsp;&nbsp;&nbsp;&nbsp;#&#91;\\Override]\n\n&nbsp;&nbsp;&nbsp;&nbsp;public function ovrTest(): void {}\n\n}\n\n\/\/ On the other hand, this will fail because ovrBest()&nbsp;\n\n\/\/ (a typo) is not in the parent class\n\nclass SharedHosting extends FastComet {\n\n&nbsp;&nbsp;&nbsp;&nbsp;#&#91;\\Override]\n\n&nbsp;&nbsp;&nbsp;&nbsp;public function ovrBest(): void {}\n\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"7-smaller-additions-and-deprecations\">Smaller Additions and Deprecations<\/h2>\n\n\n\n<p>Those are not the only changes that come with PHP 8.3, though. We will sum up several more minor additions and improvements here. If you want to know more about the details, please follow the links to their articles.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>zend.max_allowed_stack_size &#8211; <\/em><\/strong>A new <a href=\"https:\/\/www.php.net\/manual\/en\/migration83.other-changes.php#migration83.other-changes.ini\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">INI setting<\/a> that allows for setting the maximum stack size;<\/li>\n\n\n\n<li><strong><em>ZipArchive::getArchiveFlag() &#8211; <\/em><\/strong>A <a href=\"https:\/\/www.php.net\/manual\/en\/ziparchive.getarchiveflag.php\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">class method<\/a> for ZIP archives;<\/li>\n\n\n\n<li><strong><em>str_increment(), str_decrement(), and stream_context_set_options() &#8211; <\/em><\/strong>Three new <a href=\"https:\/\/www.php.net\/releases\/8.3\/en.php#:~:text=New%20str_increment()%2C%20str_decrement()%2C%20and%20stream_context_set_options()%20functions.\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">string functions<\/a>;<\/li>\n\n\n\n<li><strong><em>socket_atmark() &#8211; <\/em><\/strong>New <a href=\"https:\/\/www.php.net\/manual\/en\/function.socket-atmark.php\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">socket function<\/a>;<\/li>\n\n\n\n<li><strong><em>posix_sysconf(), posix_pathconf(), posix_fpathconf(), and posix_eaccess() &#8211; <\/em><\/strong>Four new <a href=\"https:\/\/www.php.net\/releases\/8.3\/en.php#:~:text=New%20mb_str_pad()%20function.-,New,-posix_sysconf()%2C\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">POSIX functions<\/a>;<\/li>\n\n\n\n<li><strong><em>mb_str_pad() &#8211; <\/em><\/strong><em>New <\/em><a href=\"https:\/\/www.php.net\/manual\/en\/function.mb-str-pad.php\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"><em>multibyte string<\/em><\/a><em> <\/em>function;<\/li>\n<\/ul>\n\n\n\n<p>These are the most important smaller additions. Please refer to their complete documentation for a full breakdown of everything else that PHP 8.3 introduced.<\/p>\n\n\n\n<p>Finally, as with any update, PHP 8.3 introduces some deprecations, which you should know.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <em>U_MULTIPLE_DECIMAL_SEPERATORS<\/em> constant is deprecated in favor of <em>U_MULTIPLE_DECIMAL_SEPARATORS<\/em>;<\/li>\n\n\n\n<li>The <em>3MT_RAND_PHP Mt19937<\/em> variant is deprecated;<\/li>\n\n\n\n<li><em>ReflectionClass::getStaticProperties()<\/em> is no longer nullable;<\/li>\n\n\n\n<li>INI settings <em>assert.active<\/em>, <em>assert.bail<\/em>, <em>assert.callback<\/em>, <em>assert.exception<\/em>, and <em>assert.warning<\/em> are deprecated;<\/li>\n\n\n\n<li>Calling <em>get_class()<\/em> and <em>get_parent_class()<\/em> without arguments have been deprecated.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"8-conclusion\">Conclusion<\/h2>\n\n\n\n<p>These are all the significant changes the 8.3 update for PHP brings. It is already available on all our servers and hosting plans. If you need help changing the PHP version for your plan, server, or website, we have a fantastic <a href=\"https:\/\/www.fastcomet.com\/tutorials\/cpanel\/php-version\" target=\"_blank\" rel=\"noreferrer noopener\">tutorial<\/a> for that. Alternatively, you can contact us <a href=\"https:\/\/cloud.fastcomet.com\/tickets\/create\" target=\"_blank\" rel=\"noreferrer noopener\">via ticket<\/a> or <a href=\"https:\/\/www.fastcomet.com\" target=\"_blank\" rel=\"noreferrer noopener\">live chat<\/a>, and our 24\/7, always-human Technical Support team will be happy to assist you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have been our customer for a while, you know that we always strive to provide fast, secure, and contemporary services. That implies keeping both the hardware and software we use and offer to our customers as up-to-date as possible. One piece of software had been missing from our hosting services for a few [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":9447,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4726],"tags":[4676,103,4849],"class_list":["post-9454","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-service-updates","tag-news","tag-php","tag-php-8-3"],"featured_image_src":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2024\/01\/php_8.3.png","author_info":{"display_name":"Konstantin","author_link":"https:\/\/www.fastcomet.com\/blog\/author\/konstantin"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP 8.3 Arrives To FastComet | FastComet<\/title>\n<meta name=\"description\" content=\"PHP 8.3 is now available to all FastComet customers. Please read on, find out what is new and changed, and how to apply it to your hosting.\" \/>\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-3-arrives-to-fastcomet\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP 8.3 Arrives To FastComet | FastComet\" \/>\n<meta property=\"og:description\" content=\"PHP 8.3 is now available to all FastComet customers. Please read on, find out what is new and changed, and how to apply it to your hosting.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet\" \/>\n<meta property=\"og:site_name\" content=\"FastComet Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-06T15:26:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-07T07:19:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2024\/01\/php_8.3.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=\"Konstantin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Konstantin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP 8.3 Arrives To FastComet | FastComet","description":"PHP 8.3 is now available to all FastComet customers. Please read on, find out what is new and changed, and how to apply it to your hosting.","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-3-arrives-to-fastcomet","og_locale":"en_US","og_type":"article","og_title":"PHP 8.3 Arrives To FastComet | FastComet","og_description":"PHP 8.3 is now available to all FastComet customers. Please read on, find out what is new and changed, and how to apply it to your hosting.","og_url":"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet","og_site_name":"FastComet Blog","article_published_time":"2024-02-06T15:26:19+00:00","article_modified_time":"2024-02-07T07:19:51+00:00","og_image":[{"width":1024,"height":620,"url":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2024\/01\/php_8.3.png","type":"image\/png"}],"author":"Konstantin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Konstantin","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet","url":"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet","name":"PHP 8.3 Arrives To FastComet | FastComet","isPartOf":{"@id":"https:\/\/www.fastcomet.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#primaryimage"},"image":{"@id":"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#primaryimage"},"thumbnailUrl":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2024\/01\/php_8.3.png","datePublished":"2024-02-06T15:26:19+00:00","dateModified":"2024-02-07T07:19:51+00:00","author":{"@id":"https:\/\/www.fastcomet.com\/blog\/#\/schema\/person\/62678ed882fa14cedd606946cf7efcbf"},"description":"PHP 8.3 is now available to all FastComet customers. Please read on, find out what is new and changed, and how to apply it to your hosting.","breadcrumb":{"@id":"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#primaryimage","url":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2024\/01\/php_8.3.png","contentUrl":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2024\/01\/php_8.3.png","width":1024,"height":620},{"@type":"BreadcrumbList","@id":"https:\/\/www.fastcomet.com\/blog\/php-8-3-arrives-to-fastcomet#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.fastcomet.com\/blog"},{"@type":"ListItem","position":2,"name":"PHP 8.3 Arrives To FastComet"}]},{"@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\/62678ed882fa14cedd606946cf7efcbf","name":"Konstantin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fastcomet.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f0de95dee43156fd75f091d8eacb609609882fcb55a652d545992c8fd7d8c8e7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f0de95dee43156fd75f091d8eacb609609882fcb55a652d545992c8fd7d8c8e7?s=96&d=mm&r=g","caption":"Konstantin"},"description":"Konstantin has been a part of the FastComet team for several years, and writing is his passion. He blends technical knowledge with a desire to educate, which is the perfect combination for creating comprehensive educational and informative articles. When not writing, he enjoys broadening his linguistic horizons with books of all genres.","sameAs":["https:\/\/www.fastcomet.com"],"url":"https:\/\/www.fastcomet.com\/blog\/author\/konstantin"}]}},"_links":{"self":[{"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/posts\/9454","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\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/comments?post=9454"}],"version-history":[{"count":7,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/posts\/9454\/revisions"}],"predecessor-version":[{"id":10350,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/posts\/9454\/revisions\/10350"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/media\/9447"}],"wp:attachment":[{"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/media?parent=9454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/categories?post=9454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/tags?post=9454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}