{"id":312269,"date":"2020-10-29T21:00:53","date_gmt":"2020-10-29T21:00:53","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=312269"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=312269","title":{"rendered":"PHP 8 \u2014 \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/uq\/nx\/fr\/uqnxfr7lejorah7msj0t2fnoxiq.jpeg\"><\/div>\n<p>  PHP 8 \u0443\u0436\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 release candidate, \u0432\u0435\u0440\u0441\u0438\u044f RC 3 \u0432\u044b\u0448\u043b\u0430 29 \u043e\u043a\u0442\u044f\u0431\u0440\u044f, \u0430 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u043d\u0430 26 \u043d\u043e\u044f\u0431\u0440\u044f. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0440\u0430 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0441 \u0436\u0434\u0443\u0442 \u0432 PHP 8. \u0413\u0440\u0430\u0444\u0438\u043a \u0440\u0435\u043b\u0438\u0437\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/wiki.php.net\/todo\/php80\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0410 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043b\u0435\u0436\u0438\u0442 <a href=\"https:\/\/github.com\/php\/php-src\/blob\/PHP-8.0\/UPGRADING\">\u0442\u0443\u0442<\/a>.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0442\u0438\u043f\u043e\u0432 union (<a href=\"https:\/\/wiki.php.net\/rfc\/union_types_v2\">RFC<\/a>)<\/h2>\n<p>  \u0422\u0438\u043f union \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0438\u043f\u043e\u0432, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u043e\u0434\u043d\u043e\u0433\u043e.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   class Number {     private int|float $number;       public function setNumber(int|float $number): void {         $this-&gt;number = $number;     }       public function getNumber(): int|float {         return $this-&gt;number;     } }   \/**  * We can pass both floats or integer values  * to the number object. Try passing a string.  *\/ $number = new Number();   $number-&gt;setNumber(5);   dump($number-&gt;getNumber());   $number-&gt;setNumber(11.54);   dump($number-&gt;getNumber());   exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b WeakMap (<a href=\"https:\/\/wiki.php.net\/rfc\/weak_maps\">RFC<\/a>)<\/h2>\n<p>  <\/p>\n<blockquote><p>\u0421\u043b\u0430\u0431\u044b\u0435 \u043a\u0430\u0440\u0442\u044b (weak maps) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 (\u043a\u0430\u043a \u0438 <code>SplObjectStorage<\/code>), \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0439, \u043d\u0435 \u0437\u0430\u0449\u0438\u0449\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430. \u0415\u0441\u043b\u0438 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0442\u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437 \u043a\u0430\u0440\u0442\u044b.<\/p><\/blockquote>\n<p>  \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0444\u0438\u0447\u0430. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0435\u0449\u0451 \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0443\u043c\u0430\u0442\u044c \u043e\u0431 \u0443\u0442\u0435\u0447\u043a\u0430\u0445 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u043a\u043e\u0434\u0435. \u0425\u043e\u0442\u044f \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 PHP-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u044d\u0442\u043e \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0434\u043e\u043b\u0433\u043e\u0438\u0433\u0440\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f ReactPHP. \u0421 WeakMaps \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u043e\u043c \u043c\u0443\u0441\u043e\u0440\u0430, \u043a\u043e\u0433\u0434\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c, \u0442\u043e \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0443\u0442\u0435\u0447\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   class FooBar {     public WeakMap $cache;          public function __construct() {       $this-&gt;cache = new WeakMap();     }       public function getSomethingWithCaching(object $obj) {         return $this-&gt;cache[$obj] ??= $this-&gt;computeSomethingExpensive($obj);     }          public function computeSomethingExpensive(object $obj) {     dump(&quot;I got called&quot;);     return rand(1, 100);     } }   $cacheObject = new stdClass;   $obj = new FooBar; \/\/ &quot;I got called&quot; only will be printed once $obj-&gt;getSomethingWithCaching($cacheObject); $obj-&gt;getSomethingWithCaching($cacheObject);   dump(count($obj-&gt;cache));   \/\/ When unsetting our object, the WeakMap frees up memory unset($cacheObject);   dump(count($obj-&gt;cache));   exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041d\u043e\u0432\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 ValueError<\/h2>\n<p>  \u0412 PHP 8 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 <code>ValueError<\/code>. \u041e\u043d \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 <code>\\Exception<\/code>. PHP \u0431\u0440\u043e\u0441\u0430\u0435\u0442 \u0442\u0430\u043a\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043e\u0434\u043d\u0430\u043a\u043e \u0435\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0420\u0430\u043d\u044c\u0448\u0435 \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432\u044b\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435. \u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   \/**  * We pass an array to array_rand,  * which is of the correct type. But  * array_rand expects non-empty arrays.  *  * This throws a ValueError exception.  *\/ array_rand([], 0);   \/**  * The depth argument for json_decode is a  * valid integer, but it must be greater than 0  *\/ json_decode('{}', true, -1); <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442<\/h2>\n<p>  <\/p>\n<blockquote><p>\u0412\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0435\u0441\u043b\u0438 \u0438\u0445 \u0442\u0438\u043f\u044b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0435\u043d:<\/p><\/blockquote>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   class A {     public function method(int $many, string $parameters, $here) {       } } class B extends A {     public function method(...$everything) {         dd($everything);     } }   $b = new B(); $b-&gt;method('i can be overwritten!'); exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f static (<a href=\"https:\/\/wiki.php.net\/rfc\/static_return_type\">RFC<\/a>)<\/h2>\n<p>  \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f static \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0438 \u0431\u044b\u043b \u0432\u044b\u0437\u0432\u0430\u043d, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d \u0431\u044b\u043b \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d (\u043f\u043e\u0437\u0434\u043d\u0435\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435).<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   class Test {     public function doWhatever(): static {         \/\/ Do whatever.         return $this;     } }   exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041b\u0438\u0442\u0435\u0440\u0430\u043b \u0438\u043c\u0435\u043d\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 (<a href=\"https:\/\/wiki.php.net\/rfc\/class_name_literal_on_object\">RFC<\/a>)<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>$object::class<\/code>. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435, \u043a\u0430\u043a \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <code>get_class($object)<\/code>.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   auth()-&gt;loginUsingId(1);   dump(auth()-&gt;user()::class);   \/\/ Or with a temporary variable $user = auth()-&gt;user();   dump($user::class); exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (<a href=\"https:\/\/wiki.php.net\/rfc\/variable_syntax_tweaks\">RFC<\/a>)<\/h2>\n<p>  <code>New<\/code> \u0438 <code>instanceof<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438: <code>new (\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435)(...$args)<\/code> \u0438 <code>$obj instanceof (\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435)<\/code>.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   class Foo {} class Bar {}     $class = new (collect(['Foo', 'Bar'])-&gt;random());   dd($class);   exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Stringable (<a href=\"https:\/\/wiki.php.net\/rfc\/stringable\">RFC<\/a>)<\/h2>\n<p>  \u0412 PHP 8 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <code>Stringable<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <code>__toString<\/code>. \u0412\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u044f\u0432\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   class Foo {     public function __toString() {         return 'I am a class';     } }   $obj = new Foo; dump($obj instanceof Stringable);   exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0422\u0435\u043f\u0435\u0440\u044c \u0442\u0440\u0435\u0439\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0435 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b (<a href=\"https:\/\/wiki.php.net\/rfc\/abstract_trait_method_validation\">RFC<\/a>)<\/h2>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);     trait MyTrait {     abstract private function neededByTheTrait(): string;       public function doSomething() {         return strlen($this-&gt;neededByTheTrait());     } }   class TraitUser {     use MyTrait;       \/\/ This is allowed:     private function neededByTheTrait(): string { }       \/\/ This is forbidden (incorrect return type)     \/\/ private function neededByTheTrait(): stdClass { }       \/\/ This is forbidden (non-static changed to static)     \/\/ private static function neededByTheTrait(): string { } }   exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>throw \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 (<a href=\"https:\/\/wiki.php.net\/rfc\/throw_expression\">RFC<\/a>)<\/h2>\n<p>  \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>throw<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043c, \u0433\u0434\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f: \u0432 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445, coalesce-\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 \u0442\u0435\u0440\u043d\u0430\u0440\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 (ternary\/elvis).<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   $callable = fn() =&gt; throw new Exception();   $nullableValue = null;   \/\/ $value is non-nullable. $value = $nullableValue ?? throw new \\InvalidArgumentException();     exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0412 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0438\u0441\u044f\u0449\u0430\u044f \u0437\u0430\u043f\u044f\u0442\u0430\u044f (<a href=\"https:\/\/wiki.php.net\/rfc\/trailing_comma_in_parameter_list\">RFC<\/a>)<\/h2>\n<p>  \u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u0432\u0438\u0441\u044f\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u0445, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0435\u0451 \u0438 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   function method_with_many_arguments(     $a,      $b,     $c,     $d, ) {     dump(&quot;this is valid syntax&quot;); }   method_with_many_arguments(     1,     2,     3,     4, );   exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041b\u043e\u0432\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0431\u0435\u0437 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 (<a href=\"https:\/\/wiki.php.net\/rfc\/non-capturing_catches\">RFC<\/a>)<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c <code>catch (\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435)<\/code> \u0434\u043b\u044f \u043b\u043e\u0432\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0431\u0435\u0437 \u0438\u0445 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   $nullableValue = null;   try {     $value = $nullableValue ?? throw new \\InvalidArgumentException(); } catch (\\InvalidArgumentException) {     dump(&quot;Something went wrong&quot;); }     exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0442\u0438\u043f\u0430 mixed (<a href=\"https:\/\/wiki.php.net\/rfc\/mixed_type_v2\">RFC<\/a>)<\/h2>\n<p>  \u0412 PHP 8 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f mixed. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u0435\u043d \u0442\u0438\u043f\u0430\u043c array, bool, callable, int, float, null, object, resource, string.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   function debug_function(mixed ...$data) {     dump($data); }   debug_function(1, 'string', []);   exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432<\/h2>\n<p>  \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0432 PHP 8:<\/p>\n<ul>\n<li><a href=\"https:\/\/wiki.php.net\/rfc\/attributes_v2\">https:\/\/wiki.php.net\/rfc\/attributes_v2<\/a><\/li>\n<li><a href=\"https:\/\/wiki.php.net\/rfc\/attribute_amendments\">https:\/\/wiki.php.net\/rfc\/attribute_amendments<\/a><\/li>\n<li><a href=\"https:\/\/wiki.php.net\/rfc\/shorter_attribute_syntax\">https:\/\/wiki.php.net\/rfc\/shorter_attribute_syntax<\/a><\/li>\n<li><a href=\"https:\/\/wiki.php.net\/rfc\/shorter_attribute_syntax_change\">https:\/\/wiki.php.net\/rfc\/shorter_attribute_syntax_change<\/a><\/li>\n<\/ul>\n<p>  \u042d\u0442\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 PHP 8. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441 \u043d\u0438\u043c\u0438 \u043d\u0435 \u0442\u0430\u043a \u043b\u0435\u0433\u043a\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f. \u0415\u0441\u043b\u0438 \u043a\u0440\u0430\u0442\u043a\u043e, \u0442\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 PHP-\u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0442.\u0434. \u042d\u0442\u0438 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432 PHP 7 \u0438\u043b\u0438 \u043d\u0438\u0436\u0435 \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0441\u0438\u0442\u044c doclock`\u0438, \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432 \u0441\u0430\u043c PHP.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0432\u0430\u0448\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0435 \u041f\u041e \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1); \/\/ First, we need to define the attribute. An Attribute itself is just a plain PHP class, that is annotated as an Attribute itself.   #[Attribute] class ApplyMiddleware {     public array $middleware = [];       public function __construct(...$middleware) {         $this-&gt;middleware = $middleware;     } }   \/\/ This adds the attribute to the MyController class, with the &quot;auth&quot; middleware as an argument.   #[ApplyMiddleware('auth')] class MyController {     public function index() {} }   \/\/ We can then retrieve all ApplyMiddleware attributes on our class using reflection \/\/ And read the given middleware arguments.   $reflectionClass = new ReflectionClass(MyController::class);   $attributes = $reflectionClass-&gt;getAttributes(ApplyMiddleware::class);   foreach ($attributes as $attribute) {     $middlewareAttribute = $attribute-&gt;newInstance();     dump($middlewareAttribute-&gt;middleware); }   exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u0440\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 (<a href=\"https:\/\/wiki.php.net\/rfc\/constructor_promotion\">RFC<\/a>)<\/h2>\n<p>  \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432:<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   class User {     public function __construct(         public int $id,         public string $name,     ) {} }   $user = new User(1, 'Marcel');   dump($user-&gt;id); dump($user-&gt;name);   exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f match (<a href=\"https:\/\/wiki.php.net\/rfc\/match_expression_v2\">RFC<\/a>)<\/h2>\n<p>  \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>match<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e <code>switch<\/code>, \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u043e\u0439 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   echo match (1) {     0 =&gt; 'Foo',     1 =&gt; 'Bar',     2 =&gt; 'Baz', };   exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 nullsafe (?-&gt;) (<a href=\"https:\/\/wiki.php.net\/rfc\/nullsafe_operator\">RFC<\/a>)<\/h2>\n<p>  <\/p>\n<blockquote><p>\u041a\u043e\u0433\u0434\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0440\u0430\u0432\u0435\u043d null, \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0430 \u0435\u0451 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0438\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a null. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0432\u0435\u0434\u0451\u0442 \u0441\u0435\u0431\u044f \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>-&gt;<\/code>.<\/p><\/blockquote>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   class User {     public function getAddress() {} }   $user = new User();   $country = $user?-&gt;getAddress()?-&gt;country?-&gt;iso_code;   dump($country);   exit; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (<a href=\"https:\/\/wiki.php.net\/rfc\/named_params\">RFC<\/a>)<\/h2>\n<p>  <\/p>\n<blockquote><p>\u0418\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u0430 \u043d\u0435 \u043e\u0442 \u0435\u0433\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438\u0441\u044f, \u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p><\/blockquote>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);   array_fill(start_index: 0, num: 100, value: 50);   exit; <\/code><\/pre>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/mailru\/blog\/525614\/\"> https:\/\/habr.com\/ru\/company\/mailru\/blog\/525614\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/uq\/nx\/fr\/uqnxfr7lejorah7msj0t2fnoxiq.jpeg\"><\/div>\n<p>  PHP 8 \u0443\u0436\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 release candidate, \u0432\u0435\u0440\u0441\u0438\u044f RC 3 \u0432\u044b\u0448\u043b\u0430 29 \u043e\u043a\u0442\u044f\u0431\u0440\u044f, \u0430 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u043d\u0430 26 \u043d\u043e\u044f\u0431\u0440\u044f. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0440\u0430 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0441 \u0436\u0434\u0443\u0442 \u0432 PHP 8. \u0413\u0440\u0430\u0444\u0438\u043a \u0440\u0435\u043b\u0438\u0437\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/wiki.php.net\/todo\/php80\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0410 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043b\u0435\u0436\u0438\u0442 <a href=\"https:\/\/github.com\/php\/php-src\/blob\/PHP-8.0\/UPGRADING\">\u0442\u0443\u0442<\/a>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-312269","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/312269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=312269"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/312269\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=312269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=312269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=312269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}