{"id":28194,"date":"2020-05-27T00:48:34","date_gmt":"2020-05-27T07:48:34","guid":{"rendered":"https:\/\/kinsta.com\/?p=73118"},"modified":"2024-03-01T22:42:40","modified_gmt":"2024-03-01T13:42:40","slug":"php-8","status":"publish","type":"post","link":"https:\/\/kinsta.com\/jp\/blog\/php-8\/","title":{"rendered":"PHP 8\u306e\u65b0\u6a5f\u80fd\uff08\u65b0\u6a5f\u80fd\u3001\u6539\u5584\u70b9\u3001\u304a\u3088\u3073JIT\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\uff09"},"content":{"rendered":"<p>PHP 8\u304c2020\u5e7411\u670826\u65e5\u306b\u6b63\u5f0f\u306bGA\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f!<\/p>\n<p>\u4eca\u56de\u306e\u65b0\u3057\u3044\u30e1\u30b8\u30e3\u30fc\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u306f\u3001\u591a\u304f\u306e\u6700\u9069\u5316\u3068\u5f37\u529b\u306a\u6a5f\u80fd\u304c\u5c0e\u5165\u3055\u308c\u307e\u3059\u3002\u672c\u8a18\u4e8b\u3067\u306f\u3001\u3088\u308a\u826f\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u3001\u3088\u308a\u5805\u7262\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u6700\u3082\u8208\u5473\u6df1\u3044\u5909\u66f4\u70b9\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<figure id=\"attachment_84636\" aria-describedby=\"caption-attachment-84636\" style=\"width: 399px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-84636\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2020\/05\/php-8-released.png\" alt=\"PHP 8.0\u306e\u30ea\u30ea\u30fc\u30b9\u767a\u8868\" width=\"399\" height=\"270\"><figcaption id=\"caption-attachment-84636\" class=\"wp-caption-text\"><a href=\"https:\/\/www.php.net\/releases\/8.0\/en.php\">PHP 8.0\u306e\u30ea\u30ea\u30fc\u30b9\u767a\u8868<\/a><\/figcaption><\/figure>\n<div><\/div><kinsta-auto-toc heading=\"Table of Contents\" exclude=\"last\" list-style=\"arrow\" selector=\"h2\" count-number=\"-1\"><\/kinsta-auto-toc>\n<h2 id=\"jit\">PHP JIT\uff08\u30b8\u30e3\u30b9\u30c8\u30a4\u30f3\u30bf\u30a4\u30e0\u30fb\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\uff09<\/h2>\n<p>PHP 8\u306e\u6700\u3082\u9ad8\u304f\u8a55\u4fa1\u3055\u308c\u3066\u3044\u308b\u65b0\u6a5f\u80fd\u306f\u3001<strong>\u30b8\u30e3\u30b9\u30c8\u30a4\u30f3\u30bf\u30a4\u30e0\uff08JIT\uff09\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc<\/strong>\u3067\u3059\u3002 JIT\u3068\u306f\u4f55\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p><a href=\"https:\/\/wiki.php.net\/rfc\/jit\">RFC\u63d0\u6848<\/a>\u3067\u306f\u3001JIT\u306b\u3064\u3044\u3066\u6b21\u306e\u3088\u3046\u306b\u8aac\u660e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote><p>PHP JIT\u306fOPcache\u306e\u4e00\u90e8\u3068\u3057\u3066\u3001\u3057\u304b\u3057\u307b\u307c\u72ec\u7acb\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u5b9f\u88c5\u3055\u308c\u307e\u3059\u3002PHP\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u6709\u52b9\u7121\u52b9\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u6709\u52b9\u306b\u3057\u305f\u5834\u5408\u3001PHP\u30d5\u30a1\u30a4\u30eb\u306e\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u304cOPCache\u306e\u5171\u6709\u30e1\u30e2\u30ea\u306b\u4fdd\u5b58\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u3001op_array\u2192opcodes[].handler(s)\u306fJIT\u3055\u308c\u305f\u30b3\u30fc\u30c9\u306e\u30a8\u30f3\u30c8\u30ea\u30dd\u30a4\u30f3\u30c8\u3078\u306e\u30dd\u30a4\u30f3\u30bf\u30fc\u3092\u4fdd\u6301\u3057\u307e\u3059<\/p><\/blockquote>\n<p>\u3067\u306f\u3001\u3069\u306e\u3088\u3046\u306b\u3057\u3066JIT\u306b\u5230\u9054\u3057\u305f\u306e\u3067\u3057\u3087\u3046\u304b\uff1f\u307e\u305f\u3001JIT\u3068OPcache\u306e\u9055\u3044\u306f\u4f55\u3067\u3059\u304b\uff1f<\/p>\n<p>PHP\u306eJIT\u306b\u3064\u3044\u3066\u7406\u89e3\u3092\u6df1\u3081\u308b\u305f\u3081\u306b\u3001PHP\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u6700\u7d42\u7d50\u679c\u307e\u3067\u3069\u306e\u5b9f\u884c\u30d7\u30ed\u30bb\u30b9\u3092\u7c21\u5358\u306b\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>PHP\u306e\u5b9f\u884c\u306f4\u6bb5\u968e\u306e\u30d7\u30ed\u30bb\u30b9\u3067\u3059\u3002<\/p>\n<ul>\n<li><strong>\u5b57\u53e5\u89e3\u6790\/\u30c8\u30fc\u30af\u30f3\u5316<\/strong>\uff1a\u307e\u305a\u3001\u30a4\u30f3\u30bf\u30fc\u30d7\u30ea\u30bf\u30fc\u304cPHP\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u53d6\u308a\u3001\u30c8\u30fc\u30af\u30f3\u306e\u30bb\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u69cb\u6587\u89e3\u6790<\/strong>\uff1a\u30a4\u30f3\u30bf\u30fc\u30d7\u30ea\u30bf\u30fc\u306f\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u69cb\u6587\u898f\u5247\u306b\u4e00\u81f4\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u3001\u30c8\u30fc\u30af\u30f3\u3092\u4f7f\u7528\u3057\u3066\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/abstract_syntax_tree\">\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u69cb\u9020\u306e\u968e\u5c64<\/a>\u3092\u793a\u3059<a href=\"https:\/\/en.wikipedia.org\/wiki\/Abstract_syntax_tree\">\u62bd\u8c61\u69cb\u6587\u30c4\u30ea\u30fc<\/a>\uff08AST\uff09\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<ul>\n<li><strong>\u30b3\u30f3\u30d1\u30a4\u30eb<\/strong>\uff1a\u30a4\u30f3\u30bf\u30fc\u30d7\u30ea\u30bf\u30fc\u306f\u30c4\u30ea\u30fc\u3092\u8a73\u3057\u304f\u691c\u8a0e\u3057\u3001AST\u30ce\u30fc\u30c9\u3092<a href=\"https:\/\/nikic.github.io\/2017\/04\/14\/PHP-7-Virtual-machine.html\">Zend VM\u306b\u3088\u3063\u3066\u5b9f\u884c\u3055\u308c\u308b\u547d\u4ee4\u306e\u7a2e\u985e\u3092\u6c7a\u3081\u308b\u6570\u5024\u8b58\u5225\u5b50\u3067\u3042\u308b<\/a>\u4f4e\u30ec\u30d9\u30ebZend\u30aa\u30da\u30b3\u30fc\u30c9\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u7ffb\u8a33<\/strong>\uff1a\u7ffb\u8a33\uff1a\u30aa\u30da\u30b3\u30fc\u30c9\u304c\u7ffb\u8a33\u3055\u308c\u3001Zend VM\u306b\u3088\u308a\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u6b21\u306e\u753b\u50cf\u306f\u3001\u57fa\u672c\u7684\u306aPHP\u5b9f\u884c\u30d7\u30ed\u30bb\u30b9\u3092\u8868\u3057\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<figure id=\"attachment_73105\" aria-describedby=\"caption-attachment-73105\" style=\"width: 1100px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-73105\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2020\/05\/php-execution-1.png\" alt=\"\u57fa\u672c\u7684\u306aPHP\u5b9f\u884c\u30d7\u30ed\u30bb\u30b9\" width=\"1100\" height=\"1460\"><figcaption id=\"caption-attachment-73105\" class=\"wp-caption-text\">\u57fa\u672c\u7684\u306aPHP\u5b9f\u884c\u30d7\u30ed\u30bb\u30b9<\/figcaption><\/figure>\n<p>\u3067\u306f\u3001OPcache\u306f\u3069\u306e\u3088\u3046\u306b\u3057\u3066PHP\u3092\u9ad8\u901f\u5316\u3057\u307e\u3059\u304b\uff1f\u305d\u3057\u3066\u3001\u5b9f\u884c\u30d7\u30ed\u30bb\u30b9\u306eJIT\u306b\u3088\u308b\u5909\u66f4\u70b9\u306f\u4f55\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<div><\/div><kinsta-auto-toc list-style=\"decimal\" selector=\"h3\" count-number=\"3\" sub-toc=\"true\"><\/kinsta-auto-toc>\n<h3>OPcache\u62e1\u5f35\u6a5f\u80fd<\/h3>\n<p>PHP\u306f\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u8a00\u8a9e\u3067\u3059\u3002\u3064\u307e\u308a\u3001PHP\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u5b9f\u884c\u3055\u308c\u308b\u3068\u3001\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u306f\u30ea\u30af\u30a8\u30b9\u30c8\u3054\u3068\u306b\u30b3\u30fc\u30c9\u3092\u69cb\u6587\u89e3\u6790\u3057\u3066\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001<a href=\"https:\/\/phptherightway.com\/#opcode_cache\">CPU\u30ea\u30bd\u30fc\u30b9\u3092\u7121\u99c4\u306b\u4f7f\u7528\u3057\u3066<\/a>\u3001\u8ffd\u52a0\u306e\u6642\u9593\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067<a href=\"https:\/\/www.php.net\/manual\/en\/intro.opcache.php\">OPcache\u62e1\u5f35\u6a5f\u80fd<\/a>\u304c\u767b\u5834\u3057\u307e\u3059\u3002<\/p>\n<blockquote><p>OPcache\u306f\u3001\u30d7\u30ea\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u5171\u6709\u30e1\u30e2\u30ea\u306b\u4fdd\u7ba1\u3059\u308b\u70ba\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u3054\u3068\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8aad\u307f\u8fbc\u3093\u3067\u30d1\u30fc\u30b9\u305b\u305a\u306b\u6e08\u3080\u3053\u3068\u306b\u3088\u308aPHP\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u5411\u4e0a\u3055\u305b\u307e\u3059<\/p><\/blockquote>\n<p>OPcache\u3092\u6709\u52b9\u306b\u3059\u308b\u3068\u3001PHP\u30a4\u30f3\u30bf\u30fc\u30d7\u30ea\u30bf\u30fc\u306f\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u521d\u3081\u3066\u5b9f\u884c\u3055\u308c\u308b\u3068\u304d\u306b\u306e\u307f\u3001\u4e0a\u8a18\u306e4\u30b9\u30c6\u30c3\u30d7\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002PHP\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u5171\u6709\u30e1\u30e2\u30ea\u306b\u4fdd\u5b58\u3055\u308c\u308b\u305f\u3081\u3001\u4f4e\u30ec\u30d9\u30eb\u306e\u4e2d\u9593\u8868\u73fe\u3068\u3057\u3066\u3059\u3050\u306b\u5229\u7528\u3067\u304d\u3001Zend VM\u3067\u3059\u3050\u306b\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n<figure id=\"attachment_73080\" aria-describedby=\"caption-attachment-73080\" style=\"width: 1100px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-73080\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2020\/05\/php-execution-2.png\" alt=\"OPcache\u3092\u6709\u52b9\u306b\u3057\u305fPHP\u5b9f\u884c\u30d7\u30ed\u30bb\u30b9\" width=\"1100\" height=\"1560\"><figcaption id=\"caption-attachment-73080\" class=\"wp-caption-text\">OPcache\u3092\u6709\u52b9\u306b\u3057\u305fPHP\u5b9f\u884c\u30d7\u30ed\u30bb\u30b9<\/figcaption><\/figure>\n<p>PHP 5.5\u4ee5\u964d\u3001Zend OPcache\u62e1\u5f35\u6a5f\u80fd\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u4e0a\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089<a href=\"https:\/\/kinsta.com\/jp\/blog\/phpinfo\/\"><code>phpinfo()<\/code>\u3092\u547c\u3073\u51fa\u3059<\/a>\u304b\u3001php.ini\u30d5\u30a1\u30a4\u30eb\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3060\u3051\u3067\u3001\u6b63\u3057\u304f\u69cb\u6210\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff08<a href=\"https:\/\/www.php.net\/manual\/en\/opcache.configuration.php\">OPcache\u69cb\u6210\u8a2d\u5b9a<\/a>\u3092\u53c2\u7167\uff09\u3002<\/p>\n<p>\u53c2\u7167\u6587\u732e\uff1a<a href=\"https:\/\/kinsta.com\/blog\/php-memory-limit\/\">WordPress\u306ePHP\u306e\u30e1\u30e2\u30ea\u5236\u9650\u3092\u6539\u5584\u3059\u308b\u65b9\u6cd5<\/a>.<\/p>\n<figure id=\"attachment_73106\" aria-describedby=\"caption-attachment-73106\" style=\"width: 1926px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-73106\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2020\/05\/zend-opcache.jpg\" alt=\"phpinfo\u30da\u30fc\u30b8\u306eZend OPcache\u30bb\u30af\u30b7\u30e7\u30f3\" width=\"1926\" height=\"992\"><figcaption id=\"caption-attachment-73106\" class=\"wp-caption-text\">phpinfo\u30da\u30fc\u30b8\u306eZend OPcache\u30bb\u30af\u30b7\u30e7\u30f3<\/figcaption><\/figure>\n<h3>\u30d7\u30ea\u30ed\u30fc\u30c9<\/h3>\n<p>OPcache\u306f\u6700\u8fd1\u3001<a href=\"https:\/\/kinsta.com\/jp\/blog\/php-7-4\/\">PHP 7.4<\/a>\u3067\u8ffd\u52a0\u3055\u308c\u305f\u65b0\u3057\u3044OPcache\u6a5f\u80fd\u3067\u3042\u308b<a href=\"https:\/\/wiki.php.net\/rfc\/preload\">\u30d7\u30ea\u30ed\u30fc\u30c9<\/a>\u306b\u3088\u308a\u6539\u5584\u3055\u308c\u307e\u3057\u305f\u3002\u30d7\u30ea\u30ed\u30fc\u30c9\u306f\u3001\u300c<em>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9\u304c\u5b9f\u884c\u3055\u308c\u308b\u524d\u306b<\/em>\u300d\u6307\u5b9a\u3055\u308c\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092OPcache\u30e1\u30e2\u30ea\u306b\u4fdd\u5b58\u3059\u308b\u6a5f\u80fd\u3067\u3059\u304c\u3001\u901a\u5e38\u306eWeb\u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5e45\u5e83\u3044\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u306f\u3082\u305f\u3089\u3057\u307e\u305b\u3093\u3002<\/p>\n<p>\u30d7\u30ea\u30ed\u30fc\u30c9\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u5f53\u793e\u306e<a href=\"https:\/\/kinsta.com\/jp\/blog\/php-7-4\/#preloading\">PHP 7.4\u306b\u3064\u3044\u3066\u306e\u8a18\u4e8b<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>JIT\u3067\u306f\u3001PHP\u306f\u4e00\u6b69\u524d\u9032\u3057\u307e\u3059\u3002<\/p>\n<h3>JIT \u2014\u30b8\u30e3\u30b9\u30c8\u30a4\u30f3\u30bf\u30a4\u30e0\u30fb\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc<\/h3>\n<p>\u30aa\u30da\u30b3\u30fc\u30c9\u304c\u4f4e\u30ec\u30d9\u30eb\u306e\u4e2d\u9593\u8868\u73fe\u3067\u3042\u3063\u3066\u3082\u3001\u30de\u30b7\u30f3\u30b3\u30fc\u30c9\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002JIT\u306f\u300cIR\uff08\u4e2d\u9593\u8868\u73fe\uff09\u306e\u65b0\u3057\u5f62\u3092\u5c0e\u5165\u3057\u307e\u305b\u3093\u300d\u304c\u3001<a href=\"https:\/\/luajit.org\/dynasm.html\">DynASM<\/a>\uff08\u30b3\u30fc\u30c9\u751f\u6210\u30a8\u30f3\u30b8\u30f3\u7528\u306e\u52d5\u7684\u30a2\u30bb\u30f3\u30d6\u30e9\uff09\u3092\u4f7f\u7528\u3057\u3066\u3001PHP\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u304b\u3089\u76f4\u63a5\u306b\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001<strong>JIT\u306f\u4e2d\u9593\u30b3\u30fc\u30c9\u306e\u91cd\u8981\u306a\u90e8\u5206\u3092\u30de\u30b7\u30f3\u30b3\u30fc\u30c9\u306b\u5909\u63db\u3057\u307e\u3059<\/strong>\u3002\u30b3\u30f3\u30d1\u30a4\u30eb\u3092\u30d0\u30a4\u30d1\u30b9\u3059\u308b\u304a\u304b\u3052\u3067\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3068\u30e1\u30e2\u30ea\u4f7f\u7528\u72b6\u6cc1\u3092\u5927\u5e45\u306b\u6539\u5584\u3055\u305b\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>PHP JIT\u63d0\u6848\u306e\u5171\u8457\u8005\u3067\u3042\u308bZeev Surasky\u304c\u3001JIT\u3092\u4f7f\u7528\u3059\u308b\u3068\u8a08\u7b97\u304c\u3069\u308c\u307b\u3069\u901f\u304f\u306a\u308b\u304b\u3092\u6b21\u306e\u30d3\u30c7\u30aa\u3067\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><kinsta-video src=\"https:\/\/www.youtube.com\/watch?v=dWH65pmnsrI\"><\/kinsta-video><\/p>\n<p>\u4e00\u65b9\u3001JIT\u306f<a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-performance\/\">WordPress\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9<\/a>\u3092\u52b9\u679c\u7684\u306b\u5411\u4e0a\u3055\u305b\u308b\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<h3>\u30e9\u30a4\u30d6\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u7528\u306eJIT<\/h3>\n<p>JIT RFC\u306b\u3088\u308b\u3068\u3001\u30b8\u30e3\u30b9\u30c8\u30a4\u30f3\u30bf\u30a4\u30e0\u306e\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\u5b9f\u88c5\u306b\u3088\u308a\u3001PHP\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u5411\u4e0a\u3059\u308b\u3088\u3046\u3067\u3059\u3002\u3057\u304b\u3057\u3001WordPress\u306a\u3069\u306e\u5b9f\u969b\u306e\u30a2\u30d7\u30ea\u3067\u6539\u5584\u304c\u5b9f\u969b\u306b\u898b\u3089\u308c\u308b\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u521d\u671f\u306e\u30c6\u30b9\u30c8\u3067\u306f\u3001JIT\u304cCPU\u6d88\u8cbb\u306e\u9ad8\u3044\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u5b9f\u884c\u3092\u5927\u5e45\u306b\u9ad8\u901f\u5316\u3059\u308b\u3053\u3068\u304c\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/jit#performance\">RFC\u306f\u6b21\u306e\u3088\u3046\u306b\u8ff0\u3079\u3066\u3044\u307e\u3059<\/a>\u3002<\/p>\n<blockquote><p>\u2026\u4ee5\u524d\u306e\u8a66\u307f\u3068\u540c\u69d8\u306b\u3001WordPress\u306a\u3069\u306e\u5b9f\u969b\u306e\u30a2\u30d7\u30ea\u306f\u5927\u5e45\u306b\u6539\u5584\u3055\u308c\u306a\u3044\u3088\u3046\u3067\u3059\uff08opcache.jit=1235 326\u30ea\u30af\u30a8\u30b9\u30c8\/\u79d2\u5bfe 315\u30ea\u30af\u30a8\u30b9\u30c8\/\u79d2\uff09<\/p>\n<p>\u30d7\u30ed\u30d5\u30a1\u30a4\u30ea\u30f3\u30b0\u3068\u6295\u6a5f\u7684\u306a\u6700\u9069\u5316\u3092\u4f7f\u7528\u3057\u3066\u3001\u5b9f\u969b\u306e\u30a2\u30d7\u30ea\u306eJIT\u3092\u6539\u5584\u3059\u308b\u305f\u3081\u306e\u8ffd\u52a0\u306e\u53d6\u308a\u7d44\u307f\u306f\u4e88\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u300d<\/p><\/blockquote>\n<p>JIT\u3092\u6709\u52b9\u306b\u3059\u308b\u3068\u3001\u30b3\u30fc\u30c9\u306fZend VM\u3067\u306f\u306a\u304fCPU\u81ea\u4f53\u306b\u3088\u308a\u5b9f\u884c\u3055\u308c\u308b\u305f\u3081\u3001\u8a08\u7b97\u901f\u5ea6\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002<a href=\"https:\/\/kinsta.com\/jp\/blog\/what-is-wordpress\/\">WordPress<\/a>\u306a\u3069\u306e\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306f\u3001 <a href=\"https:\/\/kinsta.com\/jp\/blog\/ttfb\/\">TTFB<\/a>\u3001<a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-repair-database\/\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u6700\u9069\u5316<\/a>\u3001<a href=\"https:\/\/kinsta.com\/jp\/learn\/what-is-http2\/\">HTTP\u30ea\u30af\u30a8\u30b9\u30c8<\/a>\u306a\u3069\u306e\u305d\u306e\u4ed6\u306e\u8981\u7d20\u306b\u3082\u3088\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<figure id=\"attachment_84635\" aria-describedby=\"caption-attachment-84635\" style=\"width: 1884px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-84635\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2020\/05\/php-8-performance-diagram.png\" alt=\"PHP 8\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30b0\u30e9\u30d5\" width=\"1884\" height=\"1206\"><figcaption id=\"caption-attachment-84635\" class=\"wp-caption-text\">JIT\u306ePHP8\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3078\u306e\u5f71\u97ff\uff08\u753b\u50cf\u306e\u51fa\u5178\uff1a<a href=\"https:\/\/www.php.net\/releases\/8.0\/en.php\">PHP 8.0\u306e\u30ea\u30ea\u30fc\u30b9\u767a\u8868<\/a>)<\/figcaption><\/figure>\n<p>\u3057\u305f\u304c\u3063\u3066\u3001WordPress\u306a\u3069\u306e\u30a2\u30d7\u30ea\u306b\u95a2\u3057\u3066\u306f\u3001PHP\u306e\u5b9f\u884c\u901f\u5ea6\u304c\u5927\u5e45\u306b\u5411\u4e0a\u3059\u308b\u3053\u3068\u306f\u671f\u5f85\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u308c\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u3001JIT\u306f<a href=\"https:\/\/kinsta.com\/blog\/web-developer-salary\/\">\u958b\u767a\u8005<\/a>\u306b\u591a\u304f\u306e\u5229\u70b9\u3092\u3082\u305f\u3089\u3059\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/externals.io\/message\/103903#103927\">Nikita Popov\u306f\u6b21\u306e\u3088\u3046\u306b\u8ff0\u3079\u3066\u3044\u307e\u3059<\/a>\u3002<\/p>\n<blockquote><p>JIT\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\u306e\u5229\u70b9\u306f\u6b21\u306e\uff08RFC\u3067\u65e2\u306b\u6982\u8aac\u3055\u308c\u3066\u3044\u308b\uff09\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u6570\u5024\u30b3\u30fc\u30c9\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u5927\u5e45\u306b\u5411\u4e0a\u3057\u307e\u3059\u3002<\/li>\n<li>\u4e00\u822c\u7684\u306aPHP \u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u3084\u3084\u5411\u4e0a\u3057\u307e\u3059\u3002<\/li>\n<li>PHP\u304c\u5341\u5206\u306b\u9ad8\u901f\u306b\u306a\u308b\u305f\u3081\u3001\u3055\u3089\u306b\u591a\u304f\u306e\u30b3\u30fc\u30c9\u3092C\u304b\u3089PHP\u306b\u79fb\u52d5\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059<\/li>\n<\/ul>\n<\/blockquote>\n<p>\u3057\u305f\u304c\u3063\u3066\u3001JIT\u306fWordPress\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306b\u5927\u304d\u306a\u6539\u5584\u3092\u3082\u305f\u3089\u3059\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001PHP\u81ea\u4f53\u304c\u5927\u5e45\u306b\u6539\u5584\u3057\u3001\u591a\u304f\u306e\u95a2\u6570\u3092\u76f4\u63a5\u306b\u66f8\u304d\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u308b\u8a00\u8a9e\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4e00\u65b9\u3001\u3088\u308a\u8907\u96d1\u306a\u3082\u306e\u306b\u306a\u308b\u305f\u3081\u3001 <a href=\"https:\/\/kinsta.com\/blog\/wordpress-maintenance\/\">\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9<\/a>\u3001\u5b89\u5b9a\u6027\u3001\u304a\u3088\u3073<a href=\"https:\/\/kinsta.com\/blog\/wordpress-debug\/\">\u30c7\u30d0\u30c3\u30b0<\/a>\u306e\u30b3\u30b9\u30c8\u306e\u5897\u52a0\u306b\u3064\u306a\u304c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3068\u3044\u3046\u77ed\u6240\u304c\u3042\u308a\u307e\u3059\u3002Dmitry Stogov\u306f\u6b21\u306e\u3088\u3046\u306b\u8ff0\u3079\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote><p>JIT\u306f\u975e\u5e38\u306b\u5358\u7d14\u306a\u3082\u306e\u3067\u3059\u304c\u3001\u3044\u305a\u308c\u306b\u3057\u3066\u3082\u3001PHP\u5168\u4f53\u306e\u8907\u96d1\u3055\u304c\u9ad8\u307e\u308b\u70ba\u3001\u65b0\u3057\u3044\u30d0\u30b0\u306e\u30ea\u30b9\u30af\u3068\u3001\u958b\u767a\u3068\u4fdd\u5b88\u306e\u30b3\u30b9\u30c8\u304c\u5897\u52a0\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059<\/p><\/blockquote>\n<p>JIT\u306e\u5c0e\u5165\u306b\u3064\u3044\u3066\u306e\u63d0\u6848\u306f50\u5bfe2\u306e\u6295\u7968\u3067\u53ef\u6c7a\u3057\u307e\u3057\u305f\u3002<\/p>\n\n<h2>PHP 8\u306e\u6539\u5584\u70b9\u3068\u65b0\u6a5f\u80fd<\/h2>\n<p>JIT\u4ee5\u5916\u306b\u3082\u3001PHP 8\u306b\u306f\u591a\u304f\u306e\u65b0\u6a5f\u80fd\u3068\u6539\u5584\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002\u6b21\u306e\u30ea\u30b9\u30c8\u306f\u3001PHP\u306e\u4fe1\u983c\u6027\u3068\u52b9\u7387\u3092\u9ad8\u3081\u308b\u8ffd\u52a0\u3068\u5909\u66f4\u3092\u53b3\u9078\u3057\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<div><\/div><kinsta-auto-toc list-style=\"disc\" selector=\"h3\" count-number=\"17\" sub-toc=\"true\"><\/kinsta-auto-toc>\n<h3 id=\"constructor-property-promotion\">\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u6607\u683c\u6a5f\u80fd<\/h3>\n<p><a href=\"https:\/\/hive.blog\/php\/@crell\/improving-php-s-object-ergonomics\">PHP\u306b\u304a\u3051\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u3084\u3059\u3055\u3092\u5411\u4e0a\u3055\u305b\u308b<\/a>\u305f\u3081\u306e\u8b70\u8ad6\u306e\u7d50\u679c\u3068\u3057\u3066\u3001 <a href=\"https:\/\/wiki.php.net\/rfc\/constructor_promotion\">\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u6607\u683c\u6a5f\u80fd<\/a>\u306eRFC\u3067\u306f\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u5ba3\u8a00\u3092\u5358\u7d14\u5316\u3057\u3001 \u5197\u9577\u6027\u3092\u306a\u304f\u3057\u305f\u65b0\u3057\u3044\u7c21\u6f54\u306a\u69cb\u6587\u304c\u63d0\u6848\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u63d0\u6848\u306f\u3001<strong>\u6607\u683c\u3055\u308c\u305f\u30d1\u30e9\u30e1\u30fc\u30bf<\/strong>\u3001\u3064\u307e\u308a <strong>public<\/strong>\u3001<strong>protected<\/strong>\u3001<strong>private<\/strong>\u306e\u53ef\u8996\u6027\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u524d\u306b\u4ed8\u3044\u305f\u30e1\u30bd\u30c3\u30c9\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u306e\u307f\u3092\u5bfe\u8c61\u306b\u3057\u3066\u3044\u3057\u307e\u3059\u3002<\/p>\n<p>\u73fe\u5728\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u4f55\u5ea6\u304b\uff08\u5c11\u306a\u304f\u3068\u30824\u56de\uff09\u7e70\u308a\u8fd4\u3057\u3066\u8a18\u5165\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002RFC\u306e\u6b21\u306e\u4f8b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><code class=\"language-php\"><span id=\"urn:enhancement-de015f85-32bd-43bd-96bd-2d31101e411b\" class=\"textannotation\">class<\/span> Point {\n    <span id=\"urn:enhancement-754672f3-711f-453a-b731-26722dafdc68\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-0276d109-eb18-49dc-aa7c-abf1889b0b81\" class=\"textannotation\">int $<\/span>x;\n    <span id=\"urn:enhancement-b8ddd8c2-ab4f-4280-8cf8-d117e655544d\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-205e521d-f6aa-4958-a9dd-65d135809621\" class=\"textannotation\">int $<\/span>y;\n    <span id=\"urn:enhancement-0e0b8747-8d12-4d3b-8099-3cc831fd7d6f\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-0caa08a8-51e9-42dc-a192-e26aea6fa875\" class=\"textannotation\">int $<\/span>z;\n\n    <span id=\"urn:enhancement-bc11f505-d04f-4be9-adf8-5a1a1db5fc76\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-36674c4f-c6c6-431b-855a-7754ede6af61\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-e7239735-9cd8-412f-bd5b-cbd92c8b10ac\" class=\"textannotation\">construct<\/span>(\n        <span id=\"urn:enhancement-90d8e87f-9117-43e9-9e53-7ef5ac2ae933\" class=\"textannotation\">int $<\/span>x = 0,\n        <span id=\"urn:enhancement-c2ba684c-d6c7-4015-9810-1b1da087e544\" class=\"textannotation\">int $<\/span>y = 0,\n        <span id=\"urn:enhancement-1458518d-74d5-4ce3-a57b-0c6c1b395074\" class=\"textannotation\">int $<\/span>z = 0,\n    ) {\n        $this-&gt;x = $x;\n        $this-&gt;y = $y;\n        $this-&gt;z = $z;\n    }\n}<\/code><\/pre>\n<p>RFC\u306e\u8457\u8005\u3067\u3042\u308bNikita Popov\u6c0f\u306b\u3088\u308b\u3068\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u5ba3\u8a00\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u5272\u308a\u5f53\u3066\u306e3\u30ab\u6240\u3067\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u3092\u5c11\u306a\u304f\u3068\u30824\u56de\u306f\u66f8\u304b\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u305d\u3046\u3067\u3059\u3002\u3053\u306e\u69cb\u6587\u306f\u3001\u7279\u306b\u591a\u304f\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u3042\u308b\u9577\u3044\u30af\u30e9\u30b9\u540d\u306e\u30af\u30e9\u30b9\u3067\u306f\u3001\u4f7f\u3044\u52dd\u624b\u304c\u60aa\u3044\u3067\u3059\u3002<\/p>\n<p>\u3053\u306eRFC\u3067\u306f\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3068\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u5b9a\u7fa9\u3092\u7d71\u5408\u3059\u308b\u3053\u3068\u304c\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001PHP 8\u3067\u306f\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u5ba3\u8a00\u306e\u3088\u308a\u4f7f\u3044\u3084\u3059\u3044\u65b9\u6cd5\u304c\u63a1\u7528\u3055\u308c\u307e\u3059\u3002\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\"><span id=\"urn:enhancement-6596d09f-71a9-4b43-a0c1-e41916907de7\" class=\"textannotation\">class<\/span> Point {\n    <span id=\"urn:enhancement-c6a7bc5f-377f-457d-b769-5f601dab3873\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-c747dbc5-6265-448b-bec1-b3e2c2528da5\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-8fcff786-8669-4ff2-9f70-5a6bb4b04f19\" class=\"textannotation\">construct<\/span>(\n        <span id=\"urn:enhancement-51e0ce3b-cebe-439c-8364-95e16b8064f8\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-67a7a0c1-d684-4309-87e5-c3b8e5900a69\" class=\"textannotation\">int $<\/span>x = 0,\n        <span id=\"urn:enhancement-7f7f5a9b-18d9-41f0-ad17-5ff9b6535f1b\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-413258d0-9c49-44ec-8713-a5077a4fee17\" class=\"textannotation\">int $<\/span>y = 0,\n        <span id=\"urn:enhancement-3af5ce48-af15-4d1b-ac87-5902bf1837f0\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-17a087cf-a904-4780-8cc9-b0e55b49fdf0\" class=\"textannotation\">int $<\/span>z = 0,\n    ) {}\n}<\/code><\/pre>\n<p>\u4ee5\u4e0a\u3067\u3059\uff01\u3053\u306e\u3088\u3046\u306b\u3001\u77ed\u304f\u3001\u8aad\u307f\u3084\u3059\u304f\u3001\u30a8\u30e9\u30fc\u304c\u8d77\u304d\u306b\u304f\u3044\u30d7\u30ed\u30d1\u30c6\u30a3\u6607\u683c\u6a5f\u80fd\u304c\u3067\u304d\u307e\u3057\u305f\u3002<a href=\"https:\/\/phpinternals.news\/53\">Nikita\u306f\u6b21\u306e\u3088\u3046\u306b\u8ff0\u3079\u3066\u3044\u307e\u3059<\/a>\u3002<\/p>\n<blockquote><p>\u5358\u7d14\u306a\u69cb\u6587\u5909\u63db\u306a\u3093\u3067\u3059\u3002\u4e00\u65b9\u3001\u305d\u306e\u304a\u304b\u3052\u3067\u3001\u7279\u306b\u30d0\u30ea\u30e5\u30fc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u305f\u3081\u306b\u66f8\u304b\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u30dc\u30a4\u30e9\u30fc\u30d7\u30ec\u30fc\u30c8\u30b3\u30fc\u30c9\u304c\u6e1b\u308a\u307e\u3059&#8230;<\/p><\/blockquote>\n<p>\u30d7\u30ed\u30d1\u30c6\u30a3\u5ba3\u8a00\u306f\u3001\u305d\u308c\u3089\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u660e\u793a\u7684\u306b\u5ba3\u8a00\u3057\u305f\u3088\u3046\u306b\u5909\u63db\u3055\u308c\u3001<a href=\"https:\/\/www.php.net\/manual\/en\/intro.reflection.php\">\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3API<\/a>\u3092\u4f7f\u3063\u3066\u5b9f\u884c\u524d\u306b\u30d7\u30ed\u30d1\u30c6\u30a3\u5b9a\u7fa9\u3092\u30a4\u30f3\u30c8\u30ed\u30b9\u30da\u30af\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff08<a href=\"https:\/\/wiki.php.net\/rfc\/constructor_promotion#desugaring\">\u8131\u7cd6<\/a>\u3092\u53c2\u7167\uff09\u3002<\/p>\n<blockquote><p>\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\uff08\u304a\u3088\u3073\u305d\u306e\u4ed6\u306e\u30a4\u30f3\u30c8\u30ed\u30b9\u30da\u30af\u30b7\u30e7\u30f3\u6a5f\u69cb\uff09\u306f\u3001 \u8131\u7cd6\u306e\u5f8c\u306e\u72b6\u614b\u3092\u89b3\u5bdf\u3057\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u6607\u683c\u3055\u308c\u305f\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u3001\u660e\u793a\u7684\u306b\u5ba3\u8a00\u3055\u308c\u305f\u30d7\u30ed\u30d1\u30c6\u30a3\u3068\u540c\u3058\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u3001\u6607\u683c\u3055\u308c\u305f\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u5f15\u6570\u306f\u3001\u901a\u5e38\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u5f15\u6570\u3068\u540c\u3058\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059<\/p><\/blockquote>\n<pre><code class=\"language-php\">\/\/ before desugaring\n<span id=\"urn:enhancement-ea7e9e40-847b-451d-b365-8ee8b2a8b67f\" class=\"textannotation\">class<\/span> Point {\n    <span id=\"urn:enhancement-362cd91a-32bf-4f8a-b32e-1d24bee82ae8\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-ece47c8a-e3c5-4284-bb67-c082632df92f\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-20213910-aa96-4b3b-a77c-ab6d1bc2d275\" class=\"textannotation\">construct<\/span>(<span id=\"urn:enhancement-e6d772eb-6eb0-4e6d-a1a1-df706ee6b531\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-c15aa0db-ed3b-499b-9506-48fb68d05187\" class=\"textannotation\">int $<\/span>x = 0) {}\n}\n\n\/\/ after desugaring\n<span id=\"urn:enhancement-d7826b36-5fa3-4cd7-a65f-2e7f27cfb211\" class=\"textannotation\">class<\/span> Point {\n    <span id=\"urn:enhancement-0baba8d3-2008-4f28-878d-7a0b8696b5fc\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-64eef131-1183-4620-ae28-958ac7ae366a\" class=\"textannotation\">int $<\/span>x;\n\n    <span id=\"urn:enhancement-5e5e222b-9563-4ecc-9d5b-d4dcf3cfd609\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-1080336e-6727-467e-a93f-5809b30df5dd\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-bc649620-3fed-4b0a-8cf7-786778c4edb9\" class=\"textannotation\">construct<\/span>(<span id=\"urn:enhancement-096ed32c-433f-4a6f-8348-a33bd2beda40\" class=\"textannotation\">int $<\/span>x = 0) {\n        $this-&gt;x = $x;\n    }\n}<\/code><\/pre>\n<h4>\u7d99\u627f<\/h4>\n<p>\u6607\u683c\u3055\u308c\u305f\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u4e00\u7dd2\u306b\u7d99\u627f\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306b\u3001\u7279\u306b\u5236\u9650\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3044\u305a\u308c\u306b\u3057\u3066\u3082\u3001\u89aa\u30af\u30e9\u30b9\u3068\u5b50\u30af\u30e9\u30b9\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b\u306f\u7279\u5225\u306a\u95a2\u4fc2\u306f\u3042\u308a\u307e\u305b\u3093\u3002<a href=\"https:\/\/phpinternals.news\/53\">Nikita\u306f\u6b21\u306e\u3088\u3046\u306b\u8ff0\u3079\u3066\u3044\u307e\u3059<\/a>\u3002<\/p>\n<blockquote><p>\u901a\u5e38\u3001\u30e1\u30bd\u30c3\u30c9\u306f\u5fc5\u305a\u89aa\u30e1\u30bd\u30c3\u30c9\u3068\u4e92\u63db\u6027\u304c\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3068\u8a00\u308f\u308c\u3066\u3044\u307e\u3059\u3002[&#8230;] \u3057\u304b\u3057\u3001\u3053\u306e\u30eb\u30fc\u30eb\u306f\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b\u306f\u9069\u7528\u3055\u308c\u307e\u305b\u3093\u3002\u3064\u307e\u308a\u3001\u3042\u308b\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306f1\u3064\u3060\u3051\u306e\u30af\u30e9\u30b9\u306b\u5c5e\u3057\u3066\u3044\u3066\u3001\u89aa\u30af\u30e9\u30b9\u3068\u5b50\u30af\u30e9\u30b9\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b\u306f\u4f55\u306e\u4e92\u63db\u6027\u3082\u5fc5\u8981\u306a\u3044\u306e\u3067\u3059<\/p><\/blockquote>\n<p>\u4e0b\u8a18\u306f\u305d\u306e\u4e00\u4f8b\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-php\"><span id=\"urn:enhancement-6dec3814-0eea-426e-b000-0f9d4bb6e422\" class=\"textannotation\">class<\/span> <span id=\"urn:enhancement-0629db22-0277-4ca2-9b01-8be56cfa7b86\" class=\"textannotation\">Test<\/span> {\n    <span id=\"urn:enhancement-2de4ae7a-63cd-4d8e-83c7-dd99deeb69c3\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-209d9f1a-7769-4019-98f8-fad5129f7073\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-7a44aef0-735d-4362-b17d-0b7cbd832dde\" class=\"textannotation\">construct<\/span>(\n        <span id=\"urn:enhancement-81ed26db-49f0-4a3a-8992-723634f42c4a\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-cc401be9-3306-4dff-8c95-04f3dcf742e5\" class=\"textannotation\">int $<\/span>x = 0\n    ) {}\n}\n\n<span id=\"urn:enhancement-667adee6-3d3a-45b7-acd7-63342b948ab7\" class=\"textannotation\">class<\/span> Child extends <span id=\"urn:enhancement-e84fd3d3-42bc-4022-90c6-5df3cf03b30e\" class=\"textannotation\">Test<\/span> {\n    <span id=\"urn:enhancement-32f8cc5b-3391-4595-84c0-4b4dfd278e3f\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-4d76e7ae-4eb3-48bb-9e93-6027c587a8b7\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-6a1db1f9-66cc-4b04-b6b4-e8e78374d4d9\" class=\"textannotation\">construct<\/span>(\n        $x, \n        <span id=\"urn:enhancement-118e91c3-6322-4b2e-a43a-b88668778fa7\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-0af0a62d-fe5c-4c6d-8bb2-9c9d08192bf4\" class=\"textannotation\">int $<\/span>y = 0,\n        <span id=\"urn:enhancement-350b22de-9449-4603-95a9-5a83b9d38208\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-3fd58e91-86ce-4605-a1ea-406ca49aee03\" class=\"textannotation\">int $<\/span>z = 0,\n    ) {\n        parent::__<span id=\"urn:enhancement-a4f00250-2fa9-4e78-a0c8-c455b3e20c79\" class=\"textannotation\">construct<\/span>($x);\n    }\n}<\/code><\/pre>\n<h4>\u6607\u683c\u3055\u308c\u305f\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u8a31\u53ef\u3055\u308c\u3066\u3044\u306a\u3044\u3082\u306e<\/h4>\n<p>\u6607\u683c\u3055\u308c\u305f\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u3001abstract\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3084\u30c8\u30ec\u30a4\u30c8\u3067\u4f7f\u7528\u3067\u304d\u307e\u3059\u304c\u3001\u3044\u304f\u3064\u304b\u306e\u5236\u9650\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u3053\u3053\u3067\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h5>abstract\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf<\/h5>\n<p>\u6607\u683c\u3055\u308c\u305f\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u3001abstract\u30af\u30e9\u30b9\u3084\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3067\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<pre><code class=\"language-php\"><span id=\"urn:enhancement-fe3fe2a3-d460-481c-9705-e5565a7de52e\" class=\"textannotation\">abstract<\/span> <span id=\"urn:enhancement-a5060262-6d68-4be3-80ac-c42b41ffacee\" class=\"textannotation\">class<\/span> <span id=\"urn:enhancement-c0817ff8-8ec3-4adb-95c7-452380bcb212\" class=\"textannotation\">Test<\/span> {\n    \/\/ <span id=\"urn:enhancement-b4972a35-d84f-4331-a223-d362714a254a\" class=\"textannotation\">Error<\/span>: Abstract <span id=\"urn:enhancement-89d0f4e1-357a-469f-b977-01646f1f3652\" class=\"textannotation\">constructor<\/span>.\n    <span id=\"urn:enhancement-d8960b1b-c5b5-4f5d-b025-f29a5a662485\" class=\"textannotation\">abstract<\/span> <span id=\"urn:enhancement-4b0d26d7-5d04-4e5b-82d1-2c272a90e479\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-6c1ca655-53f2-4e65-881e-4be4d3ea91eb\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-03f4ff80-79cc-414d-9628-d77a8f4c787c\" class=\"textannotation\">construct<\/span>(private $x);\n}\n \ninterface <span id=\"urn:enhancement-0c3ca634-2a2d-4c7c-b69f-183fc770adab\" class=\"textannotation\">Test<\/span> {\n    \/\/ <span id=\"urn:enhancement-5e809eef-8807-410b-99a5-8b92d554936a\" class=\"textannotation\">Error<\/span>: Abstract <span id=\"urn:enhancement-dd782bd7-c147-4d58-bace-188887c821c8\" class=\"textannotation\">constructor<\/span>.\n    <span id=\"urn:enhancement-2e33c4e4-2e16-41a3-a4aa-4e7d46fae73c\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-d77c9d4f-730a-4598-a75a-ebe658dcb867\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-3dd431bc-3e57-44a7-a105-1413b774066f\" class=\"textannotation\">construct<\/span>(private $x);\n}<\/code><\/pre>\n<h5>NULL\u53ef\u80fd\u306a\u578b<\/h5>\n<p>\u6700\u3082\u6ce8\u76ee\u3059\u3079\u304d\u5236\u7d04\u306e1\u3064\u306f\u3001\u300cNULL\u53ef\u80fd\u306a\u578b\u300d\u306b\u95a2\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u3053\u308c\u307e\u3067\u306f\u3001NULL\u53ef\u80fd\u3067\u306a\u3044\u5f62\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u304cnull\u306e\u5834\u5408\u3001\u305d\u306e\u578b\u306f\u6697\u9ed9\u7684\u306bnull\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u578b\u3067\u306f\u3001\u6607\u683c\u3055\u308c\u305f\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u306f\u30d7\u30ed\u30d1\u30c6\u30a3\u5ba3\u8a00\u304c\u5fc5\u8981\u3067\u3042\u308a\u3001NULL\u53ef\u80fd\u306a\u578b\u306f\u660e\u793a\u7684\u306b\u5ba3\u8a00\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u305f\u3081\u3001\u3053\u306e\u6697\u9ed9\u306e\u52d5\u4f5c\u306f\u3042\u308a\u307e\u305b\u3093\u3002RFC\u306e\u6b21\u306e\u4f8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-php\"><span id=\"urn:enhancement-222705bf-f9e9-4f03-82bd-4ed29499b501\" class=\"textannotation\">class<\/span> <span id=\"urn:enhancement-bad7defd-0480-460a-a2c1-5c7c7adb7e8f\" class=\"textannotation\">Test<\/span> {\n    \/\/ <span id=\"urn:enhancement-429228e2-baf1-45d3-b9e9-89bc863bb50b\" class=\"textannotation\">Error<\/span>: Using null default on non-nullable property\n    <span id=\"urn:enhancement-32045af0-4250-4719-ace3-33951b5d846b\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-78b60cb8-076c-4049-89db-b6b2a23711b2\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-3a6684e8-b097-4bac-bcd6-4f0b93b09061\" class=\"textannotation\">construct<\/span>(<span id=\"urn:enhancement-964ca516-be4f-46e4-9eac-ef721f525720\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-83105c7e-5681-4128-acb8-df6d424d9216\" class=\"textannotation\">Type<\/span> $prop = null) {}\n\n    \/\/ Correct: Make the type explicitly nullable instead\n    <span id=\"urn:enhancement-aead79a9-c383-4cd4-b8d8-7a0db7c2b964\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-f1c41265-6f32-449b-960e-63b001ff6a5c\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-d5729a5e-9621-44cd-86e9-a5f6fc18ea13\" class=\"textannotation\">construct<\/span>(<span id=\"urn:enhancement-ef60f832-c085-4fa3-bc48-e1d8f6a41674\" class=\"textannotation\">public<\/span> ?<span id=\"urn:enhancement-c30d236f-8c81-44d2-aa28-c869a99685b1\" class=\"textannotation\">Type<\/span> $prop = null) {}\n}<\/code><\/pre>\n<h5>\u547c\u3073\u51fa\u3057\u53ef\u80fd\u306a\u578b<\/h5>\n<p>\u547c\u3073\u51fa\u3057\u53ef\u80fd\u306a\u578b\u306f<a href=\"https:\/\/kinsta.com\/jp\/blog\/php-7-4\/#typed-properties\">\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044<\/a>\u305f\u3081\u3001\u6607\u683c\u3055\u308c\u305f\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u547c\u3073\u51fa\u3057\u53ef\u80fd\u306a\u578b\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<pre><code class=\"language-php\"><span id=\"urn:enhancement-5b4eb7d6-44ef-4268-9991-ca3dd0d25748\" class=\"textannotation\">class<\/span> <span id=\"urn:enhancement-b0bd79ff-534b-4265-afb6-a9a5fe0e5b85\" class=\"textannotation\">Test<\/span> {\n    \/\/ <span id=\"urn:enhancement-4cee60be-185d-44fa-9480-dfd585398b58\" class=\"textannotation\">Error<\/span>: Callable type not supported for properties.\n    <span id=\"urn:enhancement-418caa74-c808-463e-92fa-5ad38c6798f3\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-e2dabdf8-68d0-4878-8f0d-374234fdfbe2\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-35bdaf56-0f6d-49aa-b267-5796fd36ad4c\" class=\"textannotation\">construct<\/span>(<span id=\"urn:enhancement-59d4f323-ef99-48bc-bb5a-c42c99e17e8f\" class=\"textannotation\">public<\/span> callable $<span id=\"urn:enhancement-a394e219-9789-43d0-8721-f7d03c7902c4\" class=\"textannotation\">callback<\/span>) {}\n}<\/code><\/pre>\n<h5>var \u30ad\u30fc\u30ef\u30fc\u30c9\u306f\u4f7f\u7528\u4e0d\u53ef<\/h5>\n<p>\u6607\u683c\u3055\u308c\u305f\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u4f7f\u7528\u3067\u304d\u308b\u306e\u306f visibility \u30ad\u30fc\u30ef\u30fc\u30c9\u3060\u3051\u306a\u306e\u3067\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092 <code>var<\/code> \u30ad\u30fc\u30ef\u30fc\u30c9\u3067\u5ba3\u8a00\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\uff08RFC \u306e\u6b21\u306e\u4f8b\u3092\u53c2\u7167\uff09\u3002<\/p>\n<pre><code class=\"language-php\"><span id=\"urn:enhancement-6168d55e-e6ea-47f5-b3a0-936848e8566c\" class=\"textannotation\">class<\/span> <span id=\"urn:enhancement-26fa6248-0c75-4c5f-aa12-5ab39000f485\" class=\"textannotation\">Test<\/span> {\n    \/\/ <span id=\"urn:enhancement-d4e6aa86-ba73-4086-b54d-6a794bd105d3\" class=\"textannotation\">Error<\/span>: \"var\" <span id=\"urn:enhancement-a8f62aff-9942-4828-bb83-f5e35d92ab3d\" class=\"textannotation\">keyword<\/span> is not supported.\n    <span id=\"urn:enhancement-139f68be-8e86-45cd-9bd0-20462e998d55\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-7fc1d289-fd0d-4903-8f30-db38a8cbfd38\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-f6355082-7044-4799-b438-fb3ba24c3fa6\" class=\"textannotation\">construct<\/span>(var $prop) {}\n}<\/code><\/pre>\n<h5>\u91cd\u8907\u306f\u4f7f\u7528\u4e0d\u53ef<\/h5>\n<p>\u6607\u683c\u3055\u308c\u305f\u30d7\u30ed\u30d1\u30c6\u30a3\u3068\u660e\u793a\u7684\u306a\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u540c\u3058\u30af\u30e9\u30b9\u3067\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u3059\u304c\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u30922\u56de\u5ba3\u8a00\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<pre><code class=\"language-php\"><span id=\"urn:enhancement-197e0280-c053-46ea-bce7-d5e7bdb133d0\" class=\"textannotation\">class<\/span> <span id=\"urn:enhancement-3a28aea9-bb89-4ea2-a71d-4ac22bc10c6d\" class=\"textannotation\">Test<\/span> {\n    <span id=\"urn:enhancement-c6f2bbd6-42bb-4f67-bcb9-5d3fa4318e30\" class=\"textannotation\">public<\/span> string $prop;\n    <span id=\"urn:enhancement-ed414c6e-38b7-4287-8ef9-c1cf536a0e81\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-7a2c1933-8091-47d7-b390-a629922b78b4\" class=\"textannotation\">int $<\/span>explicitProp;\n\n    \/\/ Correct\n    <span id=\"urn:enhancement-c419a11b-b490-4f43-a207-4f9f3ca55827\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-a55594c9-2729-4174-ba79-61d5147ba106\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-31d96257-dbdf-4d01-8bf7-eb29d92cceb7\" class=\"textannotation\">construct<\/span>(<span id=\"urn:enhancement-72cc9d1c-4bdb-4fd7-8129-20678d81853c\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-86b4e1e9-175d-4c25-a3dc-51f58a44c06d\" class=\"textannotation\">int $<\/span>promotedProp, <span id=\"urn:enhancement-89790236-12bf-4942-bc05-187ab667f613\" class=\"textannotation\">int $<\/span>arg) {\n        $this-&gt;explicitProp = $arg;\n    }\n\n    \/\/ <span id=\"urn:enhancement-2f6030f9-6a49-44f3-a664-d240e39b8e5b\" class=\"textannotation\">Error<\/span>: Redeclaration of property.\n    <span id=\"urn:enhancement-0b9a79e3-2828-4c38-9057-2ced7268ab92\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-bf5a72fb-4f91-493f-8801-6e38f09c5821\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-3ec75443-dd68-424c-85e7-ddce0fe0e51e\" class=\"textannotation\">construct<\/span>(<span id=\"urn:enhancement-cc388812-331f-43be-8177-7b408bb89c3a\" class=\"textannotation\">public<\/span> string $prop) {}\n}<\/code><\/pre>\n<h5>\u53ef\u5909\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u4f7f\u7528\u4e0d\u53ef<\/h5>\n<p>\u5ba3\u8a00\u3055\u308c\u305f\u578b\u304c\u3001\u5b9f\u969b\u306b\u306f\u914d\u5217\u3067\u3042\u308b\u53ef\u5909\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u306f\u7570\u306a\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-php\"><span id=\"urn:enhancement-520dd23a-9b0c-4c91-bba7-ec1192906dc4\" class=\"textannotation\">class<\/span> <span id=\"urn:enhancement-6025096f-d6df-4a8d-a692-00cbfd091f9d\" class=\"textannotation\">Test<\/span> {\n    \/\/ <span id=\"urn:enhancement-775eea17-c86e-4d47-a910-bf3bb55276b4\" class=\"textannotation\">Error<\/span>: Variadic parameter.\n    <span id=\"urn:enhancement-049f0781-712e-428e-aa48-9c4b3dd38e93\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-dcdc20c8-de7f-474a-834d-7d525ffad89c\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-442e78f5-5bb4-4cd0-babd-f67bde691927\" class=\"textannotation\">construct<\/span>(<span id=\"urn:enhancement-fbde7238-c6d4-4848-a658-fa4c28c7f9c7\" class=\"textannotation\">public<\/span> string ...$strings) {}\n}<\/code><\/pre>\n<h4>\u95a2\u9023\u8a18\u4e8b<\/h4>\n<p>\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u6607\u683c\u6a5f\u80fd\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u77e5\u308a\u305f\u3044\u65b9\u306f\u3001<a href=\"https:\/\/phpinternals.news\/53\">Nikita Popov\u6c0f\u3078\u306e\u30a4\u30f3\u30bf\u30d3\u30e5\u30fc<\/a>\u3092\u304a\u805e\u304d\u304f\u3060\u3055\u3044\u3002PHP\u306b\u304a\u3051\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u3084\u3059\u3055\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/hive.blog\/php\/@crell\/improving-php-s-object-ergonomics\">\u3053\u3061\u3089\u306e\u8a18\u4e8b<\/a>\u3068<a href=\"https:\/\/phpinternals.news\/51\">Larry Garfield\u6c0f\u3078\u306e\u30a4\u30f3\u30bf\u30d3\u30e5\u30fc<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3 id=\"abstract-trait-methods\">\u30c8\u30ec\u30a4\u30c8\u306e\u62bd\u8c61\u30e1\u30bd\u30c3\u30c9\u306e\u691c\u8a3c<\/h3>\n<p><a href=\"https:\/\/www.php.net\/manual\/en\/language.oop5.traits.php\">\u30c8\u30ec\u30a4\u30c8<\/a>\u306f\u3001\u300cPHP \u306e\u3088\u3046\u306a\u5358\u4e00\u7d99\u627f\u8a00\u8a9e\u3067\u30b3\u30fc\u30c9\u3092\u518d\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u306e\u3072\u3068\u3064\u3067\u3059\u3002\u300d\u901a\u5e38\u3001\u8907\u6570\u306e\u30af\u30e9\u30b9\u3067\u4f7f\u7528\u3067\u304d\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u5ba3\u8a00\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u30c8\u30ec\u30a4\u30c8\u306b\u306f\u3001\u62bd\u8c61\u30e1\u30bd\u30c3\u30c9\u3092\u542b\u3081\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u5358\u306b\u30e1\u30bd\u30c3\u30c9\u306e\u30b7\u30b0\u30cd\u30c1\u30e3\u3092\u7279\u5b9a\u3057\u307e\u3059\u304c\u3001\u30e1\u30bd\u30c3\u30c9\u306e\u5b9f\u88c5\u306f\u3001\u30c8\u30ec\u30a4\u30c8\u3092\u4f7f\u7528\u3057\u3066\u30af\u30e9\u30b9\u5185\u3067\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.php.net\/manual\/en\/language.oop5.traits.php#language.oop5.traits.abstract\">PHP\u306e\u30de\u30cb\u30e5\u30a2\u30eb<\/a>\u306b\u3088\u308b\u3068\u3001<\/p>\n<blockquote><p>\u30c8\u30ec\u30a4\u30c8\u3067\u306f\u3001\u9759\u7684\u306a\u30e1\u30f3\u30d0\u30fc\u3084\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059<\/p><\/blockquote>\n<p>\u3057\u305f\u304c\u3063\u3066\u3001\u30e1\u30bd\u30c3\u30c9\u306e\u30b7\u30b0\u30cd\u30c1\u30e3\u304c\u4e00\u81f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u5fc5\u8981\u306a\u5f15\u6570\u306e\u7a2e\u985e\u3068\u6570\u306f<a href=\"https:\/\/www.php.net\/manual\/en\/language.oop5.abstract.php\">\u540c\u3058\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059<\/a>\u3002<\/p>\n<p>\u3068\u306b\u304b\u304f\u3001RFC\u306e\u4f5c\u8005\u3067\u3042\u308b<a href=\"https:\/\/externals.io\/message\/108065#108164\">Nikita Popov<\/a>\u306b\u3088\u308c\u3070\u3001\u30b7\u30b0\u30cd\u30c1\u30e3\u306e\u691c\u8a3c\u306f\u73fe\u5728\u3001\u9650\u5b9a\u7684\u306b\u5f37\u5236\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote>\n<ul>\n<li>\u30e1\u30bd\u30c3\u30c9\u306e\u5b9f\u88c5\u304c<a href=\"https:\/\/3v4l.org\/SeVK3\">https:\/\/3v4l.org\/SeVK3<\/a>\u30af\u30e9\u30b9\u306e\u4f7f\u7528\u306b\u3088\u3063\u3066\u63d0\u4f9b\u3055\u308c\u308b\u6700\u3082\u4e00\u822c\u7684\u306a\u5834\u5408\u3067\u306f\u3001\u30b7\u30b0\u30cd\u30c1\u30e3\u306e\u691c\u8a3c\u304c\u5f37\u5236\u3055\u308c\u307e\u305b\u3093\u3002<\/li>\n<li>\u5b9f\u88c5\u304c<a href=\"https:\/\/3v4l.org\/4VCIp\">https:\/\/3v4l.org\/4VCIp<\/a>\u89aa\u30af\u30e9\u30b9\u304b\u3089\u306e\u3082\u306e\u3067\u3042\u308b\u5834\u5408\u306f\u3001\u5f37\u5236\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>\u5b9f\u88c5\u304c<a href=\"https:\/\/3v4l.org\/q7Bq2\">https:\/\/3v4l.org\/q7Bq2<\/a>\u5b50\u30af\u30e9\u30b9\u304b\u3089\u306e\u3082\u306e\u3067\u3042\u308b\u5834\u5408\u306f\u3001\u5f37\u5236\u3055\u308c\u307e\u3059<\/li>\n<\/ul>\n<\/blockquote>\n<p>\u6b21\u306eNikita\u306e\u4f8b\u306f\u30011\u756a\u306e\uff08\u30b7\u30b0\u30cd\u30c1\u30e3\u304c\u5f37\u5236\u3055\u308c\u306a\u3044\uff09\u5834\u5408\u306e\u4f8b\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-php\">trait T {\n\t<span id=\"urn:enhancement-b86156f4-3faa-4e30-af4d-1f5c4e46e83f\" class=\"textannotation\">abstract<\/span> <span id=\"urn:enhancement-771aed1b-51ca-461f-a94b-21291dfb06f9\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-ef17de8d-71ad-44c1-87d6-befc33fb55db\" class=\"textannotation\">function<\/span> test(<span id=\"urn:enhancement-fdc240a7-40ec-4241-afc7-43b275322121\" class=\"textannotation\">int $<\/span>x);\n}\n \n<span id=\"urn:enhancement-b3eaaf80-d9a3-4128-894b-f33930d1a2f8\" class=\"textannotation\">class<\/span> C {\n\tuse T;\n\n\t\/\/ Allowed, but shouldn't be due to invalid type.\n\t<span id=\"urn:enhancement-a575131c-f57c-4e37-976a-7b74ea33b46b\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-f1aa5492-1d73-49ea-96f2-535d2f3e363e\" class=\"textannotation\">function<\/span> test(string $x) {}\n}<\/code><\/pre>\n<p>\u305d\u3046\u306f\u8a00\u3063\u3066\u3082\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/abstract_trait_method_validation\">\u3053\u306eRFC<\/a>\u3067\u306f\u3001\u5b9f\u88c5\u30e1\u30bd\u30c3\u30c9\u304c\u305d\u306e\u8d77\u6e90\u306b\u95a2\u4fc2\u306a\u304f\u3001\u30c8\u30ec\u30a4\u30c8\u306e\u62bd\u8c61\u30e1\u30bd\u30c3\u30c9\u3068\u4e92\u63db\u6027\u304c\u306a\u3044\u5834\u5408\u3001\u5e38\u306b\u81f4\u547d\u7684\u306a\u30a8\u30e9\u30fc\u3092\u51fa\u3059\u3053\u3068\u304c\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code>Fatal <span id=\"urn:enhancement-78938272-1dc2-4582-868c-dc6d74a7c869\" class=\"textannotation\">error<\/span>: <span id=\"urn:enhancement-64952c08-66ed-4c79-9394-9d3df453e8c4\" class=\"textannotation\">Declaration<\/span> of C::test(string $x) must be compatible with T::test(<span id=\"urn:enhancement-362c3b0d-7ece-4785-a44c-d5e56cce755f\" class=\"textannotation\">int $<\/span>x) in \/path\/to\/your\/test.php on line 10<\/code><\/pre>\n<h3>\u4e92\u63db\u6027\u306e\u306a\u3044\u30e1\u30bd\u30c3\u30c9\u30b7\u30b0\u30cd\u30c1\u30e3<\/h3>\n<p>\u3053\u306eRFC\u306f\u6e80\u5834\u4e00\u81f4\u3067\u627f\u8a8d\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>PHP\u3067\u306f\u3001\u4e92\u63db\u6027\u306e\u306a\u3044\u30e1\u30bd\u30c3\u30c9\u30b7\u30b0\u30cd\u30c1\u30e3\u306b\u3088\u308b\u7d99\u627f\u30a8\u30e9\u30fc\u306f\u3001\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u306b\u5fdc\u3058\u3066\u3001\u81f4\u547d\u7684\u306a\u30a8\u30e9\u30fc\u307e\u305f\u306f\u8b66\u544a\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u3044\u305a\u308c\u304b\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u30af\u30e9\u30b9\u304c\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u4e92\u63db\u6027\u306e\u306a\u3044\u30e1\u30bd\u30c3\u30c9\u30b7\u30b0\u30cd\u30c1\u30e3\u306f\u81f4\u547d\u7684\u306a\u30a8\u30e9\u30fc\u3092\u8fd4\u3057\u307e\u3059\u3002<a href=\"https:\/\/www.php.net\/manual\/en\/language.oop5.interfaces.php\">\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u306b\u3088\u308b\u3068\uff1a<\/p>\n<blockquote><p>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u5b9f\u88c5\u3057\u305f\u30af\u30e9\u30b9\u306b\u306f\u3001 \u305d\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u30e1\u30bd\u30c3\u30c9\u3068\u3001\u30ea\u30b9\u30b3\u30d5\u306e\u7f6e\u63db\u539f\u5247(LSP)\u3068\u4e92\u63db\u6027\u304c\u53d6\u308c\u305f\u30e1\u30bd\u30c3\u30c9\u30b7\u30b0\u30cd\u30c1\u30e3\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u3046\u3057\u306a\u3051\u308c\u3070\u81f4\u547d\u7684\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059<\/p><\/blockquote>\n<p>\u4ee5\u4e0b\u306f\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/lsp_errors\">\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u7d99\u627f\u30a8\u30e9\u30fc<\/a>\u306e\u4f8b\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-php\">interface I {\n\t<span id=\"urn:enhancement-80e67ca7-badb-4938-ab47-375e9579a8fc\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-9559037a-098f-4775-9c74-156e9cc6c8c8\" class=\"textannotation\">function<\/span> <span id=\"urn:enhancement-ac06783d-1a91-423d-b924-d41e1020da2e\" class=\"textannotation\">method<\/span>(array $a);\n}\n<span id=\"urn:enhancement-96f2ff24-c50b-4fa2-882e-a55c3517ed30\" class=\"textannotation\">class<\/span> C implements I {\n\t<span id=\"urn:enhancement-d31cdd86-c14a-4901-8225-4d0f5e34dd0f\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-bd3f25a2-a3a2-455b-8bcc-b9ef434e9606\" class=\"textannotation\">function<\/span> <span id=\"urn:enhancement-0ccbc888-a6a4-48fa-97b3-b1e3e1d2fd0d\" class=\"textannotation\">method<\/span>(<span id=\"urn:enhancement-b2a94eba-d643-4bcd-8a87-6978c2e97dea\" class=\"textannotation\">int $<\/span>a) {}\n}<\/code><\/pre>\n<p>PHP 7.4\u3067\u306f\u3001\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u30a8\u30e9\u30fc\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<pre><code>Fatal <span id=\"urn:enhancement-df1c58af-4fac-4bf8-8e5d-20fb854b3e53\" class=\"textannotation\">error<\/span>: <span id=\"urn:enhancement-9a6daff7-42b3-454f-bd2c-a05ababb1793\" class=\"textannotation\">Declaration<\/span> of C::<span id=\"urn:enhancement-c58bfaa8-edeb-4c13-bf94-ebb543a7a673\" class=\"textannotation\">method<\/span>(<span id=\"urn:enhancement-e1377b9d-1160-442a-9137-6a503928f145\" class=\"textannotation\">int $<\/span>a) must be compatible with I::<span id=\"urn:enhancement-bb25c5f3-3257-4e76-8bfe-a994c80b8fc6\" class=\"textannotation\">method<\/span>(array $a) in \/path\/to\/your\/test.php on line 7<\/code><\/pre>\n<p>\u4e92\u63db\u6027\u306e\u306a\u3044\u30b7\u30b0\u30cd\u30c1\u30e3\u306e\u3042\u308b\u5b50\u30af\u30e9\u30b9\u306e\u95a2\u6570\u306f\u8b66\u544a\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8fd4\u3057\u307e\u3059\u3002RFC\u306e\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-php\"><span id=\"urn:enhancement-2b9f22a9-e1c0-49f4-b657-9419f8b66362\" class=\"textannotation\">class<\/span> C1 {\n\t<span id=\"urn:enhancement-8ce1b782-d783-4b8a-a642-682002ba4ac8\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-d195809c-c813-401c-b466-eba2e1ee61d4\" class=\"textannotation\">function<\/span> <span id=\"urn:enhancement-cde40b6b-9496-40a5-9f2e-c16e385ce8ac\" class=\"textannotation\">method<\/span>(array $a) {}\n}\n<span id=\"urn:enhancement-3ee79582-1521-4414-bd7f-1c8242ac70d5\" class=\"textannotation\">class<\/span> C2 extends C1 {\n\t<span id=\"urn:enhancement-c5205782-b4ab-4bc3-a36f-c89773d47e9f\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-2f690091-5513-4c63-92c0-b3fea05f3a94\" class=\"textannotation\">function<\/span> <span id=\"urn:enhancement-8e339191-790a-427b-bbca-80ed57674b0a\" class=\"textannotation\">method<\/span>(<span id=\"urn:enhancement-e3f88789-8a9e-4d5b-9625-536f65779be1\" class=\"textannotation\">int $<\/span>a) {}\n}<\/code><\/pre>\n<p>PHP 7.4\u3067\u306f\u3001\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u306f\u5358\u306b\u8b66\u544a\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<pre><code>Warning: <span id=\"urn:enhancement-07341d3d-b4af-410a-b776-3aaae88eaa5f\" class=\"textannotation\">Declaration<\/span> of C2::<span id=\"urn:enhancement-0dc00a8c-8162-46eb-9100-9791398fcf34\" class=\"textannotation\">method<\/span>(<span id=\"urn:enhancement-d50e0d74-500a-42ff-b04f-dff286a5c224\" class=\"textannotation\">int $<\/span>a) should be compatible with C1::<span id=\"urn:enhancement-b3414a54-cfa4-4751-acc0-34d5aab94b77\" class=\"textannotation\">method<\/span>(array $a) in \/path\/to\/your\/test.php on line 7<\/code><\/pre>\n<p>\u305d\u3053\u3067\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/lsp_errors\">\u3053\u306eRFC<\/a>\u3067\u306f\u3001\u4e92\u63db\u6027\u306e\u306a\u3044\u30e1\u30bd\u30c3\u30c9\u30b7\u30b0\u30cd\u30c1\u30e3\u306b\u5bfe\u3057\u3066\u5e38\u306b\u81f4\u547d\u7684\u306a\u30a8\u30e9\u30fc\u3092\u8fd4\u3059\u3053\u3068\u304c\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002PHP 8\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3067\u6b21\u306e\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre><code>Fatal <span id=\"urn:enhancement-ca21aa14-f6d1-433c-b8f3-e0ec759aa396\" class=\"textannotation\">error<\/span>: <span id=\"urn:enhancement-7194e62c-e139-4eeb-9fa6-ea50f4a1e9c8\" class=\"textannotation\">Declaration<\/span> of C2::<span id=\"urn:enhancement-9035e08a-fa5d-4ccb-8714-19a68c14122c\" class=\"textannotation\">method<\/span>(<span id=\"urn:enhancement-c26c872b-eec7-4806-b626-0089af9435de\" class=\"textannotation\">int $<\/span>a) must be compatible with C1::<span id=\"urn:enhancement-1da30632-ff26-4977-8053-1509dcd382fc\" class=\"textannotation\">method<\/span>(array $a) in \/path\/to\/your\/test.php on line 7<\/code><\/pre>\n<h3 id=\"negative-array-index\">\u30de\u30a4\u30ca\u30b9\u30b9\u30bf\u30fc\u30c8\u306e\u914d\u5217\u30a4\u30f3\u30c7\u30c3\u30af\u30b9<\/h3>\n<p>PHP\u3067\u306f\u3001\u914d\u5217\u306e\u6700\u521d\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8ca0\uff08<code>start_index &lt; 0<\/code>\uff09\u306e\u5834\u5408\u306f\u3001\u305d\u308c\u4ee5\u964d\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308a\u307e\u3059\u3002\uff08\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/www.php.net\/manual\/en\/function.array-fill.php\"><code>array_fill<\/code>\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002\uff09\u6b21\u306e\u4f8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-php\">$a = array_fill(-5, 4, true);\nvar_dump($a);<\/code><\/pre>\n<p>PHP 7.4\u3067\u306f\u3001\u7d50\u679c\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code>array(4) {\n\t[-5]=&gt;\n\t<span id=\"urn:enhancement-69084749-c283-4bb5-98ea-a9662cfcc402\" class=\"textannotation\">bool<\/span>(true)\n\t[0]=&gt;\n\t<span id=\"urn:enhancement-f8a23079-80a7-4721-82d7-21ac8e474457\" class=\"textannotation\">bool<\/span>(true)\n\t[1]=&gt;\n\t<span id=\"urn:enhancement-975a04d4-7224-4bab-814b-9fb0c4362a34\" class=\"textannotation\">bool<\/span>(true)\n\t[2]=&gt;\n\t<span id=\"urn:enhancement-0869d377-9e74-434f-bd9a-f0ab9d03fe91\" class=\"textannotation\">bool<\/span>(true)\n}<\/code><\/pre>\n<p>\u305d\u3053\u3067\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/negative_array_index\">\u3053\u306eRFC<\/a>\u306f\u3001<code>start_index<\/code>\u306e\u5024\u306b\u95a2\u4fc2\u306a\u304f\u30012\u756a\u76ee\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c<code>start_index + 1<\/code>\u306b\u306a\u308b\u3088\u3046\u306b\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>PHP 8\u3067\u306f\u3001\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u914d\u5217\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code>array(4) {\n\t[-5]=&gt;\n\t<span id=\"urn:enhancement-dd8b31e0-be27-404f-beff-f933f58e00b6\" class=\"textannotation\">bool<\/span>(true)\n\t[-4]=&gt;\n\t<span id=\"urn:enhancement-427b14b6-57e9-4c67-b53c-f38645248d86\" class=\"textannotation\">bool<\/span>(true)\n\t[-3]=&gt;\n\t<span id=\"urn:enhancement-92e5d9e9-df05-4cc8-9d45-1a76010801e9\" class=\"textannotation\">bool<\/span>(true)\n\t[-2]=&gt;\n\t<span id=\"urn:enhancement-a150f199-bd40-4415-b8a8-b6de093a6ef5\" class=\"textannotation\">bool<\/span>(true)\n}<\/code><\/pre>\n<p>PHP 8\u3067\u306f\u3001\u30de\u30a4\u30ca\u30b9\u30b9\u30bf\u30fc\u30c8\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u914d\u5217\u306e\u52d5\u4f5c\u304c\u5909\u308f\u308a\u307e\u3059\u3002\u4e0b\u4f4d\u4e92\u63db\u6027\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/negative_array_index#backward_incompatible_changes\">RFC<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3 id=\"union-types-2-0\">union\u578b2.0<\/h3>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Union_type\">union\u578b\uff08union\u578b\uff09<\/a> \u306f\u3001\u5358\u4e00\u306e\u578b\u3067\u306f\u306a\u304f\u3001\u8907\u6570\u306e\u7570\u306a\u308b\u578b\u306e\u5024\u3092\u53d7\u3051\u5165\u308c\u307e\u3059\u3002PHP\u306f\u65e2\u306b\u3001<code>?Type<\/code>\u69cb\u6587\u3068\u7279\u5225\u306a<code>iterable<\/code>\u578b\u3092\u9664\u3044\u3066\u3001union\u578b\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>PHP 8\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3001\u6b21\u306eRFC\u306e\u4f8b\u306b\u306e\u3088\u3046\u306b\u3001union\u578b\u306f<a href=\"https:\/\/docs.phpdoc.org\/latest\/guides\/types.html#multiple-types-combined\">phpdoc\u6ce8\u91c8\u3067\u306e\u307f\u6307\u5b9a\u3067\u304d\u307e\u3057\u305f<\/a>\u3002<\/p>\n<pre><code class=\"language-php\"><span id=\"urn:enhancement-0388e173-a964-467b-8249-3105f0ba4b84\" class=\"textannotation\">class<\/span> Number {\n\t\/**\n\t * @var int|float $number\n\t *\/\n\tprivate $number;\n\n\t\/**\n\t * @param int|float $number\n\t *\/\n\t<span id=\"urn:enhancement-adf14ddd-a500-46cc-b77a-f5ee71df62d1\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-8f3581bb-ede5-4016-b2b5-27e9e9cdafa7\" class=\"textannotation\">function<\/span> setNumber($number) {\n\t\t$this-&gt;number = $number;\n\t}\n\n\t\/**\n\t * @<span id=\"urn:enhancement-c56bf226-ac84-4db9-82a5-c51d7ce35cf0\" class=\"textannotation\">return<\/span> int|float\n\t *\/\n\t<span id=\"urn:enhancement-4a8e4275-ae65-49e7-9d90-18f77a4cd395\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-42420204-8840-46e3-bee6-aaa2a4a5a572\" class=\"textannotation\">function<\/span> getNumber() {\n\t\t<span id=\"urn:enhancement-4aca75ba-ade5-428d-97ef-44b727473c11\" class=\"textannotation\">return<\/span> $this-&gt;number;\n\t}\n}<\/code><\/pre>\n<p>\u305d\u3053\u3067\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/union_types_v2\">union\u578b2.0\u306e RFC<\/a>\u3067\u306f\u3001\u95a2\u6570\u306e\u30b7\u30b0\u30cd\u30c1\u30e3\u306bunion\u578b\u306e\u30b5\u30dd\u30fc\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u304c\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001 <a href=\"https:\/\/docs.phpdoc.org\/latest\/guide\/getting-started\/your-first-set-of-documentation.html\">\u30a4\u30f3\u30e9\u30a4\u30f3\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u306b\u983c\u308b\u3053\u3068\u306a\u304f\u3001union\u578b\u3092\u69cb\u6587<code>T1|T2|...<\/code>\u3067\u8868\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\"><span id=\"urn:enhancement-7cfefcbf-9291-4cad-af37-b20fa1f464c0\" class=\"textannotation\">class<\/span> Number {\n\tprivate int|float $number;\n\n\t<span id=\"urn:enhancement-285f2a80-5556-4d9d-b623-e2e840788af5\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-5979bc25-3daf-44b0-a51b-0d6363032601\" class=\"textannotation\">function<\/span> setNumber(int|float $number): <span id=\"urn:enhancement-b7ae3055-8c31-4799-8adb-7264db75208f\" class=\"textannotation\">void<\/span> {\n\t\t$this-&gt;number = $number;\n\t}\n\n\t<span id=\"urn:enhancement-ffc634fc-7862-4dad-b1e7-4f0f45805ec9\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-0d32ee47-0a45-4623-8a7e-5c6b163d946f\" class=\"textannotation\">function<\/span> getNumber(): int|float {\n\t\t<span id=\"urn:enhancement-10f9aeaf-7cfb-4660-946d-756567e469e5\" class=\"textannotation\">return<\/span> $this-&gt;number;\n\t}\n}<\/code><\/pre>\n<p>RFC\u3067\u306f\u3001Nikita Popov\u304c\u6b21\u306e\u3088\u3046\u306b\u8ff0\u3079\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote><p>\u8a00\u8a9e\u3067union\u578b\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u3088\u308a\u591a\u304f\u306e\u578b\u60c5\u5831\u3092phpdoc\u306b\u983c\u308b\u3053\u3068\u306a\u304f\u95a2\u6570\u30b7\u30b0\u30cd\u30c1\u30e3\u306b\u79fb\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u591a\u6570\u306e\u5229\u70b9\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u578b\u306f\u5b9f\u969b\u306b\u5f37\u5236\u3055\u308c\u308b\u305f\u3081\u3001\u30df\u30b9\u3092\u65e9\u671f\u306b\u767a\u898b\u3067\u304d\u308b\u3002<\/li>\n<li>\u30a8\u30c3\u30b8\u30b1\u30fc\u30b9\u3092\u898b\u9003\u3057\u305f\u308a\u3001\u4ed5\u69d8\u5909\u66f4\u306e\u969b\u306b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u66f4\u65b0\u3057\u5fd8\u308c\u305f\u308a\u3059\u308b\u53ef\u80fd\u6027\u304c\u6e1b\u308b\u3002<\/li>\n<li>\u7d99\u627f\u6642\u306b\u3082\u30ea\u30b9\u30b3\u30d5\u306e\u7f6e\u63db\u539f\u5247\u3092\u9069\u7528\u3067\u304d\u308b\u3002<\/li>\n<li>\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u304b\u3089\u5229\u7528\u3067\u304d\u308b\u3002<\/li>\n<li>phpdoc\u3088\u308a\u5206\u91cf\u304c\u6e1b\u3089\u305b\u308b<\/li>\n<\/ul>\n<\/blockquote>\n<p>union\u578b\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u4f8b\u5916\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u73fe\u5728PHP\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u5168\u3066\u306e\u578b\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li><code>void<\/code>\u306f\u95a2\u6570\u304c<a href=\"https:\/\/wiki.php.net\/rfc\/void_return_type\">\u5024\u3092\u8fd4\u3055\u306a\u3044<\/a>\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u305f\u3081\u3001<code>void<\/code>\u578b\u304cunion\u578b\u306e\u4e00\u90e8\u3068\u306a\u308b\u3053\u3068\u306f\u6c7a\u3057\u3066\u3067\u304d\u307e\u305b\u3093\u3002<\/li>\n<li><code>null<\/code>\u578b\u306funion\u578b\u306e\u4e00\u90e8\u3068\u3057\u3066\u306e\u307f\u6709\u52b9\u306a\u578b\u3067\u3001\u5358\u72ec\u3067\u4f7f\u3046\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/li>\n<li>null\u8a31\u5bb9\u578b\u8868\u8a18\uff08<code>?T<\/code>\uff09\u306f\u3001<code>T|null<\/code>\u306e\u7701\u7565\u5f62\u3068\u3057\u3066\u4eca\u5f8c\u3082\u6709\u52b9\u306a\u69cb\u6587\u3067\u3059\u304c\u3001union\u578b\u3068<code>?T<\/code>\u8868\u8a18\u3092\u6df7\u305c\u3066\u4f7f\u7528\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002\uff08<code>?T1|T2<\/code>\u306f\u5168\u3066\u4e0d\u6b63\u306a\u6587\u6cd5\u3067\u3001\u3053\u306e\u5834\u5408\u306f<code>T1|T2|null<\/code>\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\uff09<\/li>\n<li>\u591a\u304f\u306e\u95a2\u6570\uff08\u4f8b\u3048\u3070\u3001<code>strpos()<\/code>\u3001<code>strstr()<\/code>\u3001<code>substr()<\/code>\u306a\u3069\uff09\u3067\u306f\u3001\u53ef\u80fd\u306a\u623b\u308a\u5024\u306e\u578b\u306e\u4e2d\u306b<code>false<\/code>\u304c\u3042\u308b\u305f\u3081\u3001<code>false<\/code>\u7591\u4f3c\u578b\u3082\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><a href=\"https:\/\/wiki.php.net\/rfc\/union_types_v2\">union\u578b2.0<\/a>\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001RFC\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3 id=\"type-errors-internal-functions\">\u5185\u90e8\u95a2\u6570\u306eTypeError\u306e\u4e00\u8cab\u6027<\/h3>\n<p>\u4e0d\u6b63\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304c\u6e21\u3055\u308c\u305f\u5834\u5408\u3001<a href=\"https:\/\/www.php.net\/manual\/en\/functions.internal.php\">\u5185\u90e8\u95a2\u6570<\/a>\u3068<a href=\"https:\/\/www.php.net\/manual\/en\/functions.user-defined.php\">\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u95a2\u6570<\/a>\u306e\u52d5\u4f5c\u306f\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u95a2\u6570\u3067\u306f<code>TypeError<\/code>\u304c\u8fd4\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u5185\u90e8\u95a2\u6570\u306e\u52d5\u4f5c\u306f\u8907\u6570\u306e\u6761\u4ef6\u306b\u5fdc\u3058\u3066\u305d\u308c\u305e\u308c\u7570\u306a\u308a\u307e\u3059\u3002\u6700\u3082\u3088\u304f\u3042\u308b\u52d5\u4f5c\u306f\u8b66\u544a\u3092\u51fa\u3057\u3066<code>null<\/code>\u3092\u8fd4\u3059\u3053\u3068\u3067\u3059\u3002PHP 7.4\u306e\u6b21\u306e\u4f8b\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-php\">var_dump(<span id=\"urn:enhancement-053cdba0-9711-4cce-b80d-ae3f1b425771\" class=\"textannotation\">strlen<\/span>(<span id=\"urn:enhancement-0c746cc9-837d-4e89-89fe-7c90a9e65ce6\" class=\"textannotation\">new<\/span> stdClass));<\/code><\/pre>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u6b21\u306e\u8b66\u544a\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre><code>Warning: <span id=\"urn:enhancement-1fc9aad4-fc75-425c-87a7-7c9481678399\" class=\"textannotation\">strlen<\/span>() expects parameter 1 to be string, object given in \/path\/to\/your\/test.php on line 4\nNULL<\/code><\/pre>\n<p><code>strict_types<\/code>\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u5834\u5408\u3001\u307e\u305f\u306f\u5f15\u6570\u60c5\u5831\u304c\u578b\u3092\u6307\u5b9a\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u52d5\u4f5c\u306f\u7570\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3067\u306f\u3001\u578b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3001<code>TypeError<\/code>\u304c\u8fd4\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u72b6\u6cc1\u306f\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/consistent_type_errors#issues\">RFC\u306e\u300c\u8ab2\u984c\u300d\u30bb\u30af\u30b7\u30e7\u30f3<\/a>\u3067\u5341\u5206\u306b\u8aac\u660e\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u3001\u591a\u304f\u306e\u554f\u984c\u306b\u3064\u306a\u304c\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u4e0d\u6574\u5408\u3092\u306a\u304f\u3059\u305f\u3081\u306b\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/consistent_type_errors\">\u3053\u306eRFC proposes<\/a>\u3067\u306f\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u578b\u304c\u4e00\u81f4\u3057\u306a\u3044\u5834\u5408\u306b\u5185\u90e8\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u89e3\u6790API\u3092\u5e38\u306b<code>ThrowError<\/code>\u3092\u751f\u6210\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u304c\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>PHP 8\u3067\u306f\u3001\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u30a8\u30e9\u30fc\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<pre><code>Fatal <span id=\"urn:enhancement-68ba7d8f-6a7c-4257-a8cc-2e2d359a6a08\" class=\"textannotation\">error<\/span>: Uncaught TypeError: <span id=\"urn:enhancement-4ef3e767-03f6-4c5b-8a98-133dbb9c1619\" class=\"textannotation\">strlen<\/span>(): Argument #1 ($str) must be of type string, object given in \/path\/to\/your\/test.php:4\nStack trace:\n#0 {main}\n  thrown in \/path\/to\/your\/test.php on line 4<\/code><\/pre>\n<h3 id=\"throw-expression\">throw\u5f0f<\/h3>\n<p>PHP\u3067\u306f\u3001<code>throw<\/code>\u306f<a href=\"https:\/\/www.php.net\/manual\/en\/control-structures.intro.php\">\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8<\/a>\u3067\u3042\u308b\u305f\u3081\u3001<a href=\"https:\/\/www.php.net\/manual\/en\/language.expressions.php\">\u5f0f<\/a>\u3057\u304b\u4f7f\u7528\u3067\u304d\u306a\u3044\u5834\u6240\u3067\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p><a href=\"https:\/\/wiki.php.net\/rfc\/throw_expression\">\u3053\u306eRFC<\/a>\u3067\u306f\u3001\u5f0f\u304c\u8a31\u53ef\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u5834\u5408\u3067\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3001<a href=\"https:\/\/www.php.net\/manual\/en\/language.exceptions.php\"><code>throw<\/code>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8<\/a>\u3092\u5f0f\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001<a href=\"https:\/\/kinsta.com\/jp\/blog\/php-7-4\/#arrow-functions\">\u77e2\u5370\u95a2\u6570<\/a>\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/isset_ternary\">null\u7d50\u5408\u6f14\u7b97\u5b50<\/a>\u3001<a href=\"https:\/\/www.php.net\/manual\/en\/language.operators.comparison.php#language.operators.comparison.ternary\">\u4e09\u9805\u6f14\u7b97\u5b50\u304a\u3088\u3073elvis\u6f14\u7b97\u5b50<\/a>\u306a\u3069\u3002<\/p>\n<p>RFC\u306e\u6b21\u306e\u4f8b\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-php\">$callable = fn() =&gt; throw <span id=\"urn:enhancement-28886143-67a4-4f2c-a154-e70688253265\" class=\"textannotation\">new<\/span> Exception();\n\n\/\/ $<span id=\"urn:enhancement-6e7eaad1-2d0d-4894-808a-0398f4b13b85\" class=\"textannotation\">value<\/span> is non-nullable.\n$<span id=\"urn:enhancement-6cc492ee-e24b-4cff-8f53-d42997a7629c\" class=\"textannotation\">value<\/span> = $nullableValue ?? throw <span id=\"urn:enhancement-465aadfc-fba0-4e49-9e9d-740b31bce50c\" class=\"textannotation\">new<\/span> InvalidArgumentException();\n \n\/\/ $<span id=\"urn:enhancement-98f83776-713a-4ca4-bd02-4fcb318d387f\" class=\"textannotation\">value<\/span> is truthy.\n$<span id=\"urn:enhancement-2cbafc52-4755-40f8-84fe-70735d6f3c0a\" class=\"textannotation\">value<\/span> = $falsableValue ?: throw <span id=\"urn:enhancement-6f4322fe-a161-41cb-a531-ba4caee91a6a\" class=\"textannotation\">new<\/span> InvalidArgumentException();<\/code><\/pre>\n<h3 id=\"weak-maps\">\u5f31\u3044\u30de\u30c3\u30d4\u30f3\u30b0<\/h3>\n<p>\u5f31\u3044\u30de\u30c3\u30d4\u30f3\u30b0\u306f\u3001\u30ad\u30fc\u304c\u5f31\u304f\u53c2\u7167\u3055\u308c\u308b\u4e00\u9023\u306e\u30c7\u30fc\u30bf\uff08\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09\u306e\u3053\u3068\u3067\u3059\u3002\u3064\u307e\u308a\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u30ac\u30d9\u30fc\u30b8\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306e\u5bfe\u8c61\u3068\u306a\u308b\u3053\u3068\u304c\u4e88\u9632\u3055\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>PHP 7.4\u3067\u306f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u81ea\u4f53\u306e\u7834\u68c4\u3092\u59a8\u3052\u306a\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u53c2\u7167\u3092\u4fdd\u6301\u3059\u308b\u65b9\u6cd5\u3068\u3057\u3066\u3001<a href=\"https:\/\/kinsta.com\/jp\/blog\/php-7-4\/#weakreferences\">\u5f31\u3044\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/a>\u304c\u5c0e\u5165\u3055\u308c\u307e\u3057\u305f\u3002Nikita Popov\u304c\u6307\u6458\u3057\u305f\u3088\u3046\u306b\u3001<\/p>\n<blockquote><p>\u751f\u306e\u5f31\u3044\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u306e\u7528\u9014\u304c\u9650\u3089\u308c\u3066\u304a\u308a\u3001\u5b9f\u969b\u306b\u306f\u5f31\u30de\u30c3\u30d4\u30f3\u30b0\u306e\u65b9\u304c\u306f\u308b\u304b\u306b\u4e00\u822c\u7684\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u7834\u68c4\u6642\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001PHP\u306e\u5f31\u3044\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u306e\u4e0a\u306b\u52b9\u7387\u7684\u306a\u5f31\u3044\u30de\u30c3\u30d4\u30f3\u30b0\u3092\u5b9f\u88c5\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093<\/p><\/blockquote>\n<p>\u3057\u305f\u304c\u3063\u3066\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/weak_maps\">\u3053\u306eRFC<\/a>\u3067\u306f<code>WeakMap<\/code>\u30af\u30e9\u30b9\u304c\u5c0e\u5165\u3055\u308c\u3001\u30ad\u30fc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u304c\u305d\u308c\u4ee5\u4e0a\u306a\u3044\u5834\u5408\u3001\u7834\u68c4\u3057\u3066\u30a6\u30a3\u30fc\u30af\u30de\u30c3\u30d4\u30f3\u30b0\u304b\u3089\u524a\u9664\u3067\u304d\u308b\u30a6\u30a3\u30fc\u30af\u30de\u30c3\u30d7\u30ad\u30fc\u3068\u3057\u3066\u4f7f\u7528\u3055\u308c\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u884c\u6642\u9593\u306e\u9577\u3044\u30d7\u30ed\u30bb\u30b9\u3067\u306f\u3001\u3053\u308c\u306b\u3088\u308a\u30e1\u30e2\u30ea\u30ea\u30fc\u30af\u304c\u9632\u6b62\u3055\u308c\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002RFC\u306e\u6b21\u306e\u4f8b\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-php\">$map = <span id=\"urn:enhancement-143cdfbc-cdd3-4c3d-8367-9f0a48ca4ba3\" class=\"textannotation\">new<\/span> WeakMap;\n$obj = <span id=\"urn:enhancement-9e5f0b1c-ad12-4275-a13d-0bbf5f9f9236\" class=\"textannotation\">new<\/span> stdClass;\n$map[$obj] = 42;\nvar_dump($map);<\/code><\/pre>\n<p>PHP 8\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u306e\u7d50\u679c\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\uff08<a href=\"https:\/\/3v4l.org\/o6lZX\/rfc#output\">\u5b9f\u884c\u4e2d\u306e\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u306f\u3053\u3061\u3089<\/a>\u3092\u53c2\u7167\uff09<\/p>\n<pre><code>object(WeakMap)#1 (1) {\n\t[0]=&gt;\n\tarray(2) {\n\t\t[\"key\"]=&gt;\n\t\tobject(stdClass)#2 (0) {\n\t\t}\n\t\t[\"<span id=\"urn:enhancement-8d2bea29-5988-4282-8cce-1a86f40bf1b8\" class=\"textannotation\">value<\/span>\"]=&gt;\n\t\tint(42)\n\t}\n}<\/code><\/pre>\n<p>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u6307\u5b9a\u3092\u89e3\u9664\u3059\u308b\u3068\u3001\u30ad\u30fc\u306f\u30a6\u30a3\u30fc\u30af\u30de\u30c3\u30d4\u30f3\u30b0\u304b\u3089\u81ea\u52d5\u7684\u306b\u524a\u9664\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">unset($obj);\nvar_dump($map);<\/code><\/pre>\n<p>\u3053\u308c\u3067\u306f\u3001\u7d50\u679c\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code>object(WeakMap)#1 (0) {\n}<\/code><\/pre>\n<p>\u5f31\u3044\u30de\u30c3\u30d4\u30f3\u30b0\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/weak_maps\">RFC<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002\u63d0\u6848\u306f\u6e80\u5834\u4e00\u81f4\u3067\u627f\u8a8d\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<h3 id=\"trailing-commas\">\u30d1\u30e9\u30e1\u30fc\u30bf\u30ea\u30b9\u30c8\u306e\u672b\u5c3e\u306e\u30ab\u30f3\u30de<\/h3>\n<p>\u672b\u5c3e\u306e\u30ab\u30f3\u30de\u306f\u3001\u3042\u3089\u3086\u308b\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u30a2\u30a4\u30c6\u30e0\u306e\u30ea\u30b9\u30c8\u306b\u8ffd\u52a0\u3055\u308c\u308b\u30ab\u30f3\u30de\u3067\u3059\u3002PHP 7.2\u3067\u306f<a href=\"https:\/\/kinsta.com\/jp\/blog\/php-7-2\/#trailing-commas-in-list-syntax\">\u30ea\u30b9\u30c8\u69cb\u6587\u306e\u672b\u5c3e\u306e\u30ab\u30f3\u30de<\/a>\u3001<a href=\"https:\/\/kinsta.com\/jp\/blog\/php-7-3\/#trailing-comma-in-function-calls\">PHP 7.3\u3067\u306f\u95a2\u6570\u547c\u3073\u51fa\u3057\u306e\u672b\u5c3e\u306e\u30ab\u30f3\u30de<\/a>\u304c\u5c0e\u5165\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>PHP 8\u3067\u306f\u3001\u6b21\u306e\u4f8b\u306b\u793a\u3059\u3088\u3046\u306b\u3001\u95a2\u6570\u3001\u30e1\u30bd\u30c3\u30c9\u3001\u304a\u3088\u3073\u30af\u30ed\u30fc\u30b8\u30e3\u30fc\u3092\u542b\u3080<a href=\"https:\/\/wiki.php.net\/rfc\/trailing_comma_in_parameter_list\">\u30d1\u30e9\u30e1\u30fc\u30bf\u30ea\u30b9\u30c8\u306e\u672b\u5c3e\u306e\u30ab\u30f3\u30de<\/a>\u304c\u5c0e\u5165\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\"><span id=\"urn:enhancement-092a54d8-9fee-4850-8171-643ad6c1aaa3\" class=\"textannotation\">class<\/span> <span id=\"urn:enhancement-6a63b97e-9bb3-4506-a582-242d40e3fe92\" class=\"textannotation\">Foo<\/span> {\n\t<span id=\"urn:enhancement-9bcc7e03-e3e0-44cf-8d28-681647f12208\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-38cbf439-0a39-45bb-b72d-1b2345d6f0c1\" class=\"textannotation\">function<\/span> __<span id=\"urn:enhancement-a4ecf8e4-b682-4a13-a5f2-ccd206c5581d\" class=\"textannotation\">construct<\/span>(\n\t\tstring $x,\n\t\t<span id=\"urn:enhancement-f75ad604-6b38-4c85-8daa-0afcca8fe430\" class=\"textannotation\">int $<\/span>y,\n\t\tfloat $z, \/\/ trailing comma\n\t) {\n\t\t\/\/ do something\n\t}\n}<\/code><\/pre>\n<p>\u3053\u306eRFC\u306f58\u5bfe1\u306e\u6295\u7968\u3067\u53ef\u6c7a\u3057\u307e\u3057\u305f\u3002<\/p>\n<h3 id=\"class-syntax-on-objects\">::class\u69cb\u6587\u304c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b<\/h3>\n<p>\u30af\u30e9\u30b9\u540d\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001<code>Foo\\Bar::class<\/code>\u69cb\u6587\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<a href=\"https:\/\/wiki.php.net\/rfc\/class_name_literal_on_object\">\u3053\u306eRFC<\/a>\u3067\u306f\u3001\u540c\u3058\u69cb\u6587\u3092\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5c55\u958b\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u4f8b\u306e\u3088\u3046\u306b\u3001\u7279\u5b9a\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30af\u30e9\u30b9\u540d\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u304c\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">$object = <span id=\"urn:enhancement-522f3014-961e-42da-83e8-20da0d39e7d6\" class=\"textannotation\">new<\/span> stdClass;\nvar_dump($object::<span id=\"urn:enhancement-7291ca84-fc8d-4c8e-a43a-8bbf4c36d045\" class=\"textannotation\">class<\/span>); \/\/ \"stdClass\"\n \n$object = null;\nvar_dump($object::<span id=\"urn:enhancement-e190882d-236f-423d-8b35-614f770312a1\" class=\"textannotation\">class<\/span>); \/\/ TypeError<\/code><\/pre>\n<p>PHP 8\u3067\u306f\u3001$object::class\u306fget_class($object)\u3068\u540c\u3058\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002PHP 8\u3067\u306f\u3001<code>$object::class<\/code>\u306f<code>get_class($object)<\/code>\u3068\u540c\u3058\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<code>$object<\/code>\u304c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u306a\u3044\u5834\u5408\u306f\u3001<code>TypeError<\/code>\u4f8b\u5916\u304c\u8fd4\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u63d0\u6848\u306f\u6e80\u5834\u4e00\u81f4\u3067\u627f\u8a8d\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<h3 id=\"attributes\">\u5c5e\u6027v2<\/h3>\n<p>\u6ce8\u91c8\u3068\u3082\u547c\u3070\u308c\u308b\u5c5e\u6027\u306f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3001\u8981\u7d20\u3001\u307e\u305f\u306f\u30d5\u30a1\u30a4\u30eb\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u6307\u5b9a\u3059\u308b\u69cb\u9020\u5316\u30e1\u30bf\u30c7\u30fc\u30bf\u3067\u3059\u3002<\/p>\n<p>PHP 7.4\u307e\u3067\u3001\u30af\u30e9\u30b9\u3084\u95a2\u6570\u306a\u3069\u306e\u5ba3\u8a00\u306b\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u552f\u4e00\u306e\u65b9\u6cd5\u306fdoc-comments\u3067\u3057\u305f\u3002\u4eca\u56de\u306e<a href=\"https:\/\/wiki.php.net\/rfc\/attributes_v2\">\u5c5e\u6027v2\u306eRFC<\/a>\u3067\u306f\u3001\u30af\u30e9\u30b9\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u3001\u95a2\u6570\u3001\u30e1\u30bd\u30c3\u30c9\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3001\u5b9a\u6570\u306a\u3069\u306e\u5ba3\u8a00\u306b\u8ffd\u52a0\u3067\u304d\u308b\u69cb\u9020\u5316\u3055\u308c\u305f\u69cb\u6587\u30e1\u30bf\u30c7\u30fc\u30bf\u3068\u3057\u3066\u5b9a\u7fa9\u3055\u308c\u308bPHP\u306e\u5c5e\u6027\u304c\u5c0e\u5165\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u5c5e\u6027\u306f\u3001\u53c2\u7167\u3059\u308b\u5ba3\u8a00\u306e\u524d\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002RFC\u306e\u6b21\u306e\u4f8b\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-php\">&lt;&lt;ExampleAttribute&gt;&gt;\n<span id=\"urn:enhancement-223b42b9-dd2f-4e4e-85eb-7978abe39114\" class=\"textannotation\">class<\/span> <span id=\"urn:enhancement-eb8255e5-cf82-496e-8eff-ef2e9c5527a0\" class=\"textannotation\">Foo<\/span>\n{\n\t&lt;&lt;ExampleAttribute&gt;&gt;\n\t<span id=\"urn:enhancement-3f15f21e-60b7-491e-9b57-fc94ae6a40f6\" class=\"textannotation\">public<\/span> const FOO = 'foo';\n\n\t&lt;&lt;ExampleAttribute&gt;&gt;\n\t<span id=\"urn:enhancement-bd197cfb-2c9e-4e78-8ff6-9330ca46312b\" class=\"textannotation\">public<\/span> $x;\n\n\t&lt;&lt;ExampleAttribute&gt;&gt;\n\t<span id=\"urn:enhancement-ad246ec2-db39-48fb-b3d1-270d72e53bff\" class=\"textannotation\">public<\/span> <span id=\"urn:enhancement-a64db0ff-9462-488c-a348-0855930151a5\" class=\"textannotation\">function<\/span> foo(&lt;&lt;ExampleAttribute&gt;&gt; $bar) { }\n}\n\n$object = new &lt;&lt;ExampleAttribute&gt;&gt; class () { };\n\n&lt;&lt;ExampleAttribute&gt;&gt;\nfunction f1() { }\n\n$f2 = &lt;&lt;ExampleAttribute&gt;&gt; function () { };\n\n$f3 = &lt;&lt;ExampleAttribute&gt;&gt; fn () =&gt; 1;<\/code><\/pre>\n<p>\u5c5e\u6027\u306f\u3001doc-block\u30b3\u30e1\u30f3\u30c8\u306e\u524d\u306b\u307f\u5f8c\u306b\u3082\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">&lt;&lt;ExampleAttribute&gt;&gt;\n\/** docblock *\/\n&lt;&lt;AnotherExampleAttribute&gt;&gt;\nfunction foo() {}<\/code><\/pre>\n<p>\u5404\u5ba3\u8a00\u306b\u306f1\u3064\u4ee5\u4e0a\u306e\u5c5e\u6027\u304c\u3042\u308a\u3001\u5404\u5c5e\u6027\u306b\u306f1\u3064\u4ee5\u4e0a\u306e\u95a2\u9023\u3059\u308b\u5024\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">&lt;&lt;WithoutArgument&gt;&gt;\n&lt;&lt;SingleArgument(0)&gt;&gt;\n&lt;&lt;FewArguments('Hello', 'World')&gt;&gt;\nfunction foo() {}<\/code><\/pre>\n<p>PHP\u306e\u5c5e\u6027\u3001\u4f7f\u7528\u4f8b\u3001\u304a\u3088\u3073\u4ee3\u66ff\u69cb\u6587\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/attributes_v2\">RFC<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3 id=\"named-arguments\">\u540d\u524d\u4ed8\u304d\u5f15\u6570<\/h3>\n<p><a href=\"https:\/\/wiki.php.net\/rfc\/named_params\">\u540d\u524d\u4ed8\u304d\u5f15\u6570<\/a>\u306f\u3001\u5f15\u6570\u3092\u6e21\u3059\u3053\u3068\u3092\u53ef\u80fd\u306b\u3059\u308b\u305f\u3081\u306e\u65b0\u3057\u3044\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<blockquote><p>\u540d\u524d\u4ed8\u304d\u5f15\u6570\u306f\u3001\u4f4d\u7f6e\u3067\u306f\u306a\u304f\u3001\u540d\u524d\u30d9\u30fc\u30b9\u3067\u5f15\u6570\u3092\u6e21\u3059\u3053\u3068\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059<\/p><\/blockquote>\n<p>\u95a2\u6570\u306b\u540d\u524d\u4ed8\u304d\u306e\u5f15\u6570\u3092\u6e21\u3059\u306b\u306f\u3001\u305d\u306e\u5024\u306e\u524d\u306b\u30d1\u30e9\u30e1\u30fc\u30bf\u540d\u3092\u52a0\u3048\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-php\">callFunction(name: $value);<\/code><\/pre>\n<p>\u307e\u305f\u3001\u4ee5\u4e0b\u306e\u4f8b\u306e\u3088\u3046\u306b\u3001\u4e88\u7d04\u6e08\u307f\u306e\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">callFunction(array: $value);<\/code><\/pre>\n<p>\u3057\u304b\u3057\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u540d\u3092\u52d5\u7684\u306b\u6e21\u3059\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u8b58\u5225\u5b50\u3067\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u305f\u3081\u3001<strong>\u6b21\u306e\u3088\u3046\u306a\u69cb\u6587\u306f\u4f7f\u7528\u4e0d\u53ef\u3067\u3059<\/strong>\u3002<\/p>\n<pre><code class=\"language-php\">callFunction($name: $value);<\/code><\/pre>\n<p>\u3053\u306eRFC\u306e\u8457\u8005\u3067\u3042\u308bNikita Popov\u6c0f\u306b\u3088\u308b\u3068\u3001\u540d\u524d\u4ed8\u304d\u5f15\u6570\u306b\u306f\u3044\u304f\u3064\u304b\u306e\u5229\u70b9\u304c\u3042\u308a\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u307e\u305a\u7b2c\u4e00\u306b\u3001\u540d\u524d\u4ed8\u304d\u5f15\u6570\u306f\u3001\u305d\u306e\u610f\u5473\u304c\u8a18\u9332\u3055\u308c\u308b\u305f\u3081\u3001\u3088\u308a\u7406\u89e3\u3057\u3084\u3059\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u3051\u307e\u3059\u3002RFC\u306e\u4ee5\u4e0b\u306e\u4f8b\u3092\u898b\u308c\u3070\u3001\u4e00\u76ee\u77ad\u7136\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-php\">array_fill(start_index: 0, num: 100, value: 50);<\/code><\/pre>\n<p>\u540d\u524d\u4ed8\u304d\u5f15\u6570\u306f\u3001\u6e21\u3059\u9806\u756a\u306f\u95a2\u4fc2\u3042\u308a\u307e\u305b\u3093\u3002\u3064\u307e\u308a\u3001\u95a2\u6570\u306e\u30b7\u30b0\u30cd\u30c1\u30e3\u3068\u540c\u3058\u9806\u5e8f\u3067\u95a2\u6570\u306b\u5f15\u6570\u3092\u6e21\u3055\u306a\u304f\u3066\u3082\u304b\u307e\u3044\u307e\u305b\u3093\u3002<\/p>\n<pre><code class=\"language-php\">array_fill(value: 50, num: 100, start_index: 0);<\/code><\/pre>\n<p>\u540d\u524d\u4ed8\u304d\u5f15\u6570\u306f\u3001\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u305f\u5f15\u6570\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">htmlspecialchars($string, double_encode: false);<\/code><\/pre>\n<p>\u540d\u524d\u4ed8\u304d\u5f15\u6570\u306e\u3082\u3046\u4e00\u3064\u306e\u5927\u304d\u306a\u5229\u70b9\u306f\u3001\u5909\u66f4\u3057\u305f\u3044\u5f15\u6570\u3060\u3051\u3092\u6307\u5b9a\u3067\u304d\u308b\u3053\u3068\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u5024\u3092\u4e0a\u66f8\u304d\u3057\u305f\u304f\u306a\u3044\u5834\u5408\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u5f15\u6570\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002RFC\u306e\u6b21\u306e\u4f8b\u3092\u898b\u308c\u3070\u4e00\u76ee\u77ad\u7136\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-php\">htmlspecialchars($string, default, default, false);\n\/\/ vs\nhtmlspecialchars($string, double_encode: false);<\/code><\/pre>\n<aside role=\"note\" class=\"wp-block-kinsta-notice is-style-important\">\n            <h3>Important<\/h3>\n        <p><a href=\"https:\/\/kinsta.com\/jp\/blog\/hire-wordpress-developer\/\">WordPress\u306e\u958b\u767a\u8005<\/a>\u306e\u7686\u69d8\u3078\u306e\u6ce8\u610f\u4e8b\u9805\u3002\u57f7\u7b46\u6642\u70b9\u3067\u306f\u3001\u540d\u524d\u4ed8\u304d\u5f15\u6570\u306f<a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-5-6\/#named-parameters\">\u5f8c\u65b9\u4e92\u63db\u6027\u306e\u554f\u984c<\/a>\u306b\u3064\u306a\u304c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5341\u5206\u306a\u30c6\u30b9\u30c8\u3092\u305b\u305a\u306b\u672c\u756a\u74b0\u5883\u3067\u4f7f\u7528\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/aside>\n\n<p>\u6b21\u306eRFC\u306e\u4f8b\u306e\u3088\u3046\u306b\u3001\u540d\u524d\u4ed8\u304d\u5f15\u6570\u306f\u3001<a href=\"#attributes\">PHP\u306e\u5c5e\u6027<\/a>\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">&lt;&lt;MyAttribute('A', b: 'B')&gt;&gt;\nclass Test {}<\/code><\/pre>\n<p>\u3057\u304b\u3057\u3001\u540d\u524d\u4ed8\u304d\u5f15\u6570\u306e\u5f8c\u306b\u4f4d\u7f6e\u4ed8\u304d\u5f15\u6570\u3092\u6e21\u3059\u3053\u3068\u306f\u3067\u304d\u305a\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\u540c\u3058\u30d1\u30e9\u30e1\u30fc\u30bf\u540d\u30922\u56de\u6e21\u3057\u305f\u5834\u5408\u3082\u540c\u69d8\u3067\u3059\u3002<\/p>\n<p>\u540d\u524d\u4ed8\u304d\u5f15\u6570\u306f\u30af\u30e9\u30b9\u5ba3\u8a00\u306e\u969b\u306b\u4fbf\u5229\u3067\u3059\u3002\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306f\u901a\u5e38\u591a\u304f\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6301\u3064\u305f\u3081\u3001\u540d\u524d\u4ed8\u304d\u5f15\u6570\u306f\u3088\u308a\u4f7f\u3044\u3084\u3059\u3044\u65b9\u6cd5\u3067\u30af\u30e9\u30b9\u3092\u5ba3\u8a00\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u540d\u524d\u4ed8\u304d\u5f15\u6570\u306e\u8a73\u7d30\u3001\u5236\u7d04\u4e8b\u9805\u3001\u5f8c\u65b9\u4e92\u63db\u6027\u3001\u305d\u3057\u3066\u3044\u304f\u3064\u304b\u306e\u4f8b\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/named_params\">\u540d\u524d\u4ed8\u304d\u5f15\u6570\u306eRFC<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3 id=\"nullsafe-operator\">null\u5b89\u5168\u30aa\u30da\u30ec\u30fc\u30bf<\/h3>\n<p><a href=\"https:\/\/wiki.php.net\/rfc\/nullsafe_operator\">\u3053\u306eRFC\u3067\u306f<\/a>\u3001\u5b8c\u5168\u306a<a href=\"https:\/\/en.wikipedia.org\/wiki\/Short-circuit_evaluation\">\u30b7\u30e7\u30fc\u30c8\u30b5\u30fc\u30ad\u30c3\u30c8\u8a55\u4fa1<\/a>\u304c\u53ef\u80fd\u306anull\u5b89\u5168\u30aa\u30da\u30ec\u30fc\u30bf<code>$-&gt;<\/code>\u3092\u63d0\u6848\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b7\u30e7\u30fc\u30c8\u30b5\u30fc\u30ad\u30c3\u30c8\u8a55\u4fa1\u3067\u306f\u3001\u6700\u521d\u306e\u6f14\u7b97\u5b50\u304c<code>null<\/code>\u3068\u8a55\u4fa1\u3055\u308c\u306a\u3044\u5834\u5408\u306b\u9650\u308a\u30012 \u756a\u76ee\u306e\u6f14\u7b97\u5b50\u304c\u8a55\u4fa1\u3055\u308c\u307e\u3059\u3002\u30c1\u30a7\u30a4\u30f3\u306e\u4e2d\u306e\u6f14\u7b97\u5b50\u304c<code>null<\/code>\u3068\u8a55\u4fa1\u3055\u308c\u305f\u5834\u5408\u3001\u30c1\u30a7\u30a4\u30f3\u5168\u4f53\u306e\u5b9f\u884c\u304c\u505c\u6b62\u3057\u3001<code>null<\/code>\u3068\u8a55\u4fa1\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>RFC\u306e\u6b21\u306e\u4f8b\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-php\">$foo = $a?-&gt;b();<\/code><\/pre>\n<p><code>$a<\/code>\u304c null \u306e\u5834\u5408\u306f\u3001\u30e1\u30bd\u30c3\u30c9 <code>b()<\/code>\u306f\u547c\u3073\u51fa\u3055\u308c\u305a\u3001<code>$foo<\/code>\u306f<code>null<\/code>\u306b\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u4ed6\u306e\u4f8b\u3084\u4f8b\u5916\u3001\u4eca\u5f8c\u306e\u7bc4\u56f2\u306b\u3064\u3044\u3066\u306f\u3001 <a href=\"https:\/\/wiki.php.net\/rfc\/nullsafe_operator\">null\u5b89\u5168\u30aa\u30da\u30ec\u30fc\u30bf\u306eRFC<\/a>\u3092\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3 id=\"string-to-number-comparison\">\u6587\u5b57\u5217\u3068\u6570\u5024\u306e\u6bd4\u8f03\u306e\u5408\u7406\u5316<\/h3>\n<p>\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e PHP \u3067\u306f\u3001\u975e\u53b3\u5bc6\u306a\u6bd4\u8f03\u6f14\u7b97\u5b50\u3092\u7528\u3044\u305f\u6587\u5b57\u5217\u3068\u6570\u5024\u306e\u6bd4\u8f03\u306f\u3001\u6587\u5b57\u5217\u3092\u6570\u5024\u306b\u30ad\u30e3\u30b9\u30c8\u3057\u3001\u305d\u306e\u5f8c\u6574\u6570\u304b\u6d6e\u52d5\u5c0f\u6570\u306e\u6bd4\u8f03\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u52d5\u4f5c\u306f\u975e\u5e38\u306b\u4fbf\u5229\u306a\u5834\u9762\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u9593\u9055\u3063\u305f\u7d50\u679c\u3092\u751f\u3080\u3053\u3068\u3082\u3042\u308a\u3001\u30d0\u30b0\u3084\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u554f\u984c\u306b\u3064\u306a\u304c\u308b\u53ef\u80fd\u6027\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>RFC\u306e\u6b21\u306e\u4f8b\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-php\">$validValues = [\"foo\", \"bar\", \"baz\"];\n$value = 0;\nvar_dump(in_array($value, $validValues));\n\/\/ bool(true)<\/code><\/pre>\n<p>PHP 8 \u3067\u306f\u3001\u6587\u5b57\u5217\u3068\u6570\u5024\u306e\u6bd4\u8f03\u3092\u3088\u308a\u5408\u7406\u7684\u306b\u884c\u3046\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u305f<a href=\"https:\/\/wiki.php.net\/rfc\/string_to_number_comparison\">\u6587\u5b57\u5217\u306e\u6570\u5024\u306e\u5408\u7406\u5316<\/a>\u304c\u5c0e\u5165\u3055\u308c\u307e\u3057\u305f\u3002Nikita Popov\u6c0f\u306e\u8a00\u8449\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<blockquote><p>\u3053\u306eRFC\u3067\u306f\u3001\u6587\u5b57\u5217\u3068\u6570\u5024\u306e\u6bd4\u8f03\u3092\u3088\u308a\u5408\u7406\u7684\u306b\u3059\u308b\u3053\u3068\u3092\u610f\u56f3\u3057\u3066\u3044\u307e\u3059\u3002 \u6570\u5024\u6587\u5b57\u5217\u3092\u6570\u5024\u3068\u6bd4\u8f03\u3059\u308b\u969b\u306b\u306f\u3001\u6587\u5b57\u5217\u3092\u6570\u5024\u306b\u5909\u63db\u3057\u3066\u304b\u3089\u6bd4\u8f03\u3057\u3001\u3053\u308c\u306f\u73fe\u5728\u3068\u540c\u3058\u52d5\u4f5c\u3067\u3059\u3002\u305d\u308c\u4ee5\u5916\u306e\u5834\u5408\u306f\u3001\u6570\u5024\u3092\u6587\u5b57\u5217\u306b\u5909\u63db\u3057\u3066\u6587\u5b57\u5217\u6bd4\u8f03\u3092\u884c\u3044\u307e\u3059<\/p><\/blockquote>\n<p>\u6b21\u306e\u8868\u306f\u3001\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e PHP \u3068 PHP 8 \u3067\u306e\u6587\u5b57\u5217\u3068\u6570\u5024\u306e\u6bd4\u8f03\u306e\u52d5\u4f5c\u3092\u6bd4\u8f03\u3057\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<pre>Comparison    | Before | After\n------------------------------\n 0 == \"0\"     | true   | true\n 0 == \"0.0\"   | true   | true\n <strong>0 == \"foo\"   | true   | false<\/strong>\n <strong>0 == \"\"      | true   | false<\/strong>\n42 == \"   42\" | true   | true\n<strong>42 == \"42foo\" | true   | false<\/strong><\/pre>\n<p>\u3053\u306e\u5909\u66f4\u306b\u3088\u308b\u591a\u304f\u306e\u5f71\u97ff\u3084\u3001\u6587\u5b57\u5217\u3068\u6570\u5024\u306e\u6bd4\u8f03\u304c PHP 8 \u3067\u3069\u306e\u3088\u3046\u306b\u5909\u308f\u308b\u306e\u304b\u306b\u3064\u3044\u3066\u306f\u3001Nikita Popov \u306b\u3088\u308b<a href=\"https:\/\/wiki.php.net\/rfc\/string_to_number_comparison\">\u516c\u5f0f RFC<\/a> \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3 id=\"saner-numeric-strings\">\u6570\u5024\u3092\u542b\u3080\u6587\u5b57\u5217\u306e\u5408\u7406\u5316<\/h3>\n<p>PHP\u3067\u306f\u3001\u6570\u5b57\u3092\u542b\u3080\u6587\u5b57\u5217\u306f<a href=\"https:\/\/github.com\/php\/php-langspec\/blob\/be010b4435e7b0801737bb66b5bbdd8f9fb51dde\/spec\/05-types.md#the-string-type\">3\u3064\u306e\u30ab\u30c6\u30b4\u30ea<\/a>\u306b\u5206\u985e\u3055\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li><strong>\u6570\u5024\u6587\u5b57\u5217<\/strong>: \u6570\u5024\u3092\u542b\u3080\u6587\u5b57\u5217\u3002\u524d\u306b\u306f\u7a7a\u767d\u304c\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<li><strong>\u5148\u982d\u304c\u6570\u5b57\u306e\u6587\u5b57\u5217<\/strong>: \u6700\u521d\u306e\u6587\u5b57\u304c\u6570\u5b57\u306e\u6587\u5b57\u5217\u3067\u3001\u6700\u5f8c\u306e\u6587\u5b57\u304c\u975e\u6570\u5b57\u306e\u6587\u5b57\u5217\u3002<\/li>\n<li><strong>\u975e\u6570\u5024\u6587\u5b57\u5217<\/strong>\uff1a\u524d\u8a18\u306e\u30ab\u30c6\u30b4\u30ea\u30fc\u306e\u3044\u305a\u308c\u306b\u3082\u8a72\u5f53\u3057\u306a\u3044\u6587\u5b57\u5217\u3002<\/li>\n<\/ul>\n<p>\u6570\u5024\u6587\u5b57\u5217\u3068\u5148\u982d\u304c\u6570\u5b57\u306e\u6587\u5b57\u5217\u306f\u3001\u5b9f\u884c\u3059\u308b\u64cd\u4f5c\u306b\u3088\u3063\u3066\u6271\u3044\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li><strong>\u6587\u5b57\u5217\u304b\u3089\u6570\u5024\u3078\u306e\u660e\u793a\u7684\u306a\u5909\u63db<\/strong>\uff08\u4f8b\uff1a<code>(int)<\/code>\u304a\u3088\u3073<code>(float)<\/code>\u578b\u306e\u30ad\u30e3\u30b9\u30c8\uff09\u306f\u3001\u6570\u5024\u6587\u5b57\u5217\u3068\u5148\u982d\u304c\u6570\u5b57\u306e\u6587\u5b57\u5217\u3092\u6570\u5024\u306b\u5909\u63db\u3057\u307e\u3059\u3002\u6570\u5b57\u3067\u306a\u3044\u6587\u5b57\u5217\u3092\u660e\u793a\u7684\u306b\u6570\u5b57\u306b\u5909\u63db\u3059\u308b\u3068\u30010\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/li>\n<li><strong>\u6587\u5b57\u5217\u304b\u3089\u6570\u5024\u3078\u306e\u9ed9\u793a\u7684\u306a\u5909\u63db<\/strong>\uff08\u4f8b\uff1a<code>strict_type<\/code>\u5ba3\u8a00\u306a\u3057\uff09\u306f\u3001\u6570\u5024\u6587\u5b57\u5217\u3068\u975e\u6570\u5024\u6587\u5b57\u5217\u3067\u7570\u306a\u308b\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002\u6570\u5b57\u3067\u306f\u306a\u3044\u6587\u5b57\u5217\u304b\u3089\u6570\u5b57\u3078\u306e\u5909\u63db\u3092\u884c\u3046\u3068\u3001<code>TypeError<\/code>\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/li>\n<li><code>is_numeric()<\/code>\u306f\u3001\u6570\u5b57\u306e\u6587\u5b57\u5217\u306b\u5bfe\u3057\u3066\u306e\u307f<strong>true<\/strong>\u3092\u8fd4\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u6587\u5b57\u5217\u306e\u30aa\u30d5\u30bb\u30c3\u30c8\u3001\u7b97\u8853\u6f14\u7b97\u3001\u5897\u5206\u30fb\u6e1b\u5206\u6f14\u7b97\u3001\u6587\u5b57\u5217\u540c\u58eb\u306e\u6bd4\u8f03\u3001\u30d3\u30c3\u30c8\u6f14\u7b97\u3067\u3082\u7d50\u679c\u306f\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/wiki.php.net\/rfc\/saner-numeric-strings\">\u3053\u306eRFC<\/a>\u3067\u306f\u3001\u4ee5\u4e0b\u304c\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote><p>\u3055\u307e\u3056\u307e\u306a\u6570\u5024\u6587\u5b57\u5217\u30e2\u30fc\u30c9\u3092\u7d71\u4e00\u3057\u307e\u3059\u3002\u5148\u982d\u3068\u672b\u5c3e\u306e\u4e21\u65b9\u306b\u7a7a\u767d\u3092\u542b\u3080\u6570\u5b57\u306e\u307f\u304c\u8a31\u53ef\u3055\u308c\u307e\u3059\u3002\u4ed6\u306e\u30bf\u30a4\u30d7\u306e\u6587\u5b57\u5217\u306f\u975e\u6570\u5024\u6587\u5b57\u3067\u3042\u308a\u3001\u6570\u5024\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3067\u4f7f\u7528\u3059\u308b\u3068TypeError\u304c\u767a\u751f\u3057\u307e\u3059<\/p><\/blockquote>\n<blockquote><p>\u3064\u307e\u308a\u3001\u73fe\u5728\u3001<strong>E_NOTICE<\/strong>\u300cA non well-formed numeric value encountered\u300d\u304c\u767a\u3057\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u6587\u5b57\u5217\u306f\u3001\u5148\u982d\u304c\u6570\u5b57\u306e\u6587\u5b57\u5217\u306b\u672b\u5c3e\u306e\u30db\u30ef\u30a4\u30c8\u30b9\u30da\u30fc\u30b9\u3057\u304b\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u3092\u9664\u304d\u3001<strong>E_WARNING<\/strong>\u300cA non-numeric value encountered\u300d\u306b\u518d\u5206\u985e\u3055\u308c\u307e\u3059\u3002\u307e\u305f\u3001\u73fe\u5728<strong>E_WARNING<\/strong>\u304c\u767a\u3057\u3066\u3044\u308b\u69d8\u3005\u306a\u30b1\u30fc\u30b9\u3067\u306f\u4eca\u5f8c\u3001<code>TypeError<\/code>\u304c\u767a\u751f\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059<\/p><\/blockquote>\n<p>PHP 8 \u306b\u304a\u3051\u308b\u6570\u5024\u6587\u5b57\u5217\u95a2\u9023\u306e\u5909\u66f4\u306e\u8a73\u7d30\u3001\u30b3\u30fc\u30c9\u4f8b\u3001\u4f8b\u5916\u306e\u72b6\u6cc1\u3001\u5f8c\u65b9\u4e92\u63db\u6027\u306e\u554f\u984c\u306a\u3069\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/saner-numeric-strings\">RFC<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3 id=\"match-expression\">match\u5f0f2<\/h3>\n<p>\u65b0\u3057\u3044<code>match<\/code>\u5f0f\u306f<code>switch<\/code>\u3068\u3088\u304f\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001\u3088\u308a\u5b89\u5168\u306a\u30bb\u30de\u30f3\u30c6\u30a3\u30af\u30b9\u3092\u5099\u3048\u3066\u3001\u623b\u308a\u5024\u3092\u53ef\u80fd\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e2\u3064\u306e\u5236\u5fa1\u69cb\u9020\u306e\u9055\u3044\u3092\u7406\u89e3\u3059\u308b\u305f\u3081\u306b\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/match_expression_v2\">RFC<\/a>\u306b\u63b2\u8f09\u3055\u308c\u3066\u3044\u308b\u6b21\u306e<code>switch<\/code>\u306e\u4f8b\u3092\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><code class=\"language-php\">switch (1) {\n\tcase 0:\n\t\t$result = 'Foo';\n\t\tbreak;\n\tcase 1:\n\t\t$result = 'Bar';\n\t\tbreak;\n\tcase 2:\n\t\t$result = 'Baz';\n\t\tbreak;\n}\n \necho $result;\n\/\/&gt; Bar<\/code><\/pre>\n<p>\u6b21\u306e<code>match<\/code>\u5f0f\u3067\u3001\u4e0a\u306e\u30b3\u30fc\u30c9\u3068\u540c\u3058\u7d50\u679c\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">echo match (1) {\n\t0 =&gt; 'Foo',\n\t1 =&gt; 'Bar',\n\t2 =&gt; 'Baz',\n};\n\/\/&gt; Bar<\/code><\/pre>\n<p>\u65b0\u3057\u3044 <code>match<\/code>\u5f0f\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306e\u5927\u304d\u306a\u5229\u70b9\u306f\u3001<code>switch<\/code>\u6587\u306f\u7de9\u3084\u304b\u306a\u6bd4\u8f03 (<code>==<\/code>) \u3092\u4f7f\u3044\u3001\u4e88\u671f\u3057\u306a\u3044\u7d50\u679c\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u304c\u3001<code>match<\/code>\u5f0f\u306f\u53b3\u5bc6\u306a\u6bd4\u8f03\uff08<code>===<\/code>\uff09\u3067\u6bd4\u8f03\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001<code>match<\/code>\u5f0f\u306b\u306f\u8907\u6570\u306e\u30b3\u30f3\u30de\u533a\u5207\u308a\u306e\u5f0f\u3092\u542b\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u306e\u3067\u3001\u69cb\u6587\u304c\u3088\u308a\u7c21\u6f54\u306b\u306a\u308a\u307e\u3059\uff08<a href=\"https:\/\/www.php.net\/manual\/en\/control-structures.match.php\">\u51fa\u5178<\/a>\uff09\u3002<\/p>\n<pre><code class=\"language-php\">$result = match ($x) {\n\t\/\/ This match arm:\n\t$a, $b, $c =&gt; 5,\n\t\/\/ Is equivalent to these three match arms:\n\t$a =&gt; 5,\n\t$b =&gt; 5,\n\t$c =&gt; 5,\n};<\/code><\/pre>\n<p>\u305d\u306e\u4ed6\u306e\u4f8b\u3084\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/match_expression_v2\">match\u5f0f v2 \u306eRFC<\/a>\u304a\u3088\u3073 <a href=\"https:\/\/www.php.net\/manual\/en\/control-structures.match.php\">PHP \u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3 id=\"arithmetic-bitwise-operators\">\u7b97\u8853\u6f14\u7b97\u5b50\u3068\u30d3\u30c3\u30c8\u6f14\u7b97\u5b50\u306b\u304a\u3051\u308b\u53b3\u5bc6\u306a\u578b\u30c1\u30a7\u30c3\u30af<\/h3>\n<p>\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e PHP \u3067\u306f\u3001\u914d\u5217\u3001\u30ea\u30bd\u30fc\u30b9\u3001\u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u306a\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b<a href=\"https:\/\/www.php.net\/manual\/en\/language.operators.arithmetic.php\">\u7b97\u8853\u6f14\u7b97\u5b50<\/a>\u3068<a href=\"https:\/\/www.php.net\/manual\/en\/language.operators.bitwise.php\">\u30d3\u30c3\u30c8\u6f14\u7b97\u5b50<\/a>\u3092\u9069\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u305d\u306e\u52d5\u4f5c\u306b\u306f\u4e00\u8cab\u6027\u304c\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e<a href=\"https:\/\/wiki.php.net\/rfc\/arithmetic_operator_type_checks\">RFC<\/a>\u3067\u306f\u3001Nikita Popov\u6c0f\u304c\u7c21\u5358\u306a\u4f8b\u3092\u6319\u3052\u3066\u3001\u305d\u306e\u52d5\u4f5c\u304c\u3044\u304b\u306b\u5909\u3067\u3042\u308b\u304b\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">var_dump([] % [42]);\n\/\/ int(0)<\/code><\/pre>\n<p>\u914d\u5217\u3084\u30ea\u30bd\u30fc\u30b9\u3001\u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9\u3057\u3066\u3044\u306a\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u7b97\u8853\u6f14\u7b97\u5b50\u3084\u30d3\u30c3\u30c8\u6f14\u7b97\u5b50\u3092\u9069\u7528\u3059\u308b\u3068\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/arithmetic_operator_type_checks#current_behavior\">\u7570\u306a\u308b\u7d50\u679c\u306b\u306a\u308b<\/a>\u3053\u3068\u3092Nikita\u6c0f\u304c\u6b21\u306e\u3088\u3046\u306b\u8aac\u660e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote><p>\u6f14\u7b97\u5b50 +, -, *, \/, **<\/p>\n<ul>\n<li>\u914d\u5217\u306e\u6f14\u7b97\u5bfe\u8c61\u3067\u30a8\u30e9\u30fc\u4f8b\u5916\u3092\u767a\u751f\u3055\u305b\u307e\u3059\u3002(\u4e21\u65b9\u306e\u6f14\u7b97\u5bfe\u8c61\u304c\u914d\u5217\u306e\u5834\u5408\u306f+\u3092\u9664\u304f)<\/li>\n<li>\u30ea\u30bd\u30fc\u30b9\u306e\u6f14\u7b97\u5bfe\u8c61\u3092\u9759\u304b\u306b\u30ea\u30bd\u30fc\u30b9ID\u306b\u5909\u63db\u3057\u3066\u3001\u6574\u6570\u5316\u3057\u307e\u3059\u3002<\/li>\n<li>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u6f14\u7b97\u5bfe\u8c61\u3092\u6574\u6570\u306b\u5909\u63db\u3057\u307e\u3059\u304c\u3001\u8b66\u544a\u3092\u767a\u751f\u3055\u305b\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u6f14\u7b97\u5b50 %, &lt;&lt;, &gt;&gt;, &#038;, |, ^:<\/p>\n<ul>\n<li>\u914d\u5217\u306e\u6f14\u7b97\u5bfe\u8c61\u3092\u3001\u7a7a\u306e\u5834\u5408\u306f\u6574\u6570\u30bc\u30ed\u306b\u3001\u7a7a\u3067\u306a\u3044\u5834\u5408\u306f\u6574\u65701\u306b\u9759\u304b\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/li>\n<li>\u30ea\u30bd\u30fc\u30b9\u306e\u6f14\u7b97\u5bfe\u8c61\u3092\u9759\u304b\u306b\u30ea\u30bd\u30fc\u30b9ID\u306b\u5909\u63db\u3057\u3066\u3001\u6574\u6570\u5316\u3057\u307e\u3059\u3002<\/li>\n<li>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u6f14\u7b97\u5bfe\u8c61\u3092\u6574\u6570\u306b\u5909\u63db\u3057\u307e\u3059\u304c\u3001\u8b66\u544a\u3092\u767a\u751f\u3055\u305b\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u6f14\u7b97\u5b50\uff5e<\/p>\n<ul>\n<li>\u914d\u5217\u3001\u30ea\u30bd\u30fc\u30b9\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u6f14\u7b97\u5bfe\u8c61\u306b\u5bfe\u3057\u3066\u30a8\u30e9\u30fc\u306e\u4f8b\u5916\u3092\u767a\u751f\u3055\u305b\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u6f14\u7b97\u5b50 ++ \u304a\u3088\u3073 &#8211;<\/p>\n<ul>\n<li>\u6f14\u7b97\u5bfe\u8c61\u304c\u914d\u5217\u3001\u30ea\u30bd\u30fc\u30b9\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5834\u5408\u3001\u9759\u304b\u306b\u4f55\u3082\u3057\u307e\u305b\u3093<\/li>\n<\/ul>\n<\/blockquote>\n<p>PHP 8 \u3067\u306f\u4e8b\u60c5\u304c\u5909\u308f\u308a\u3001\u3059\u3079\u3066\u306e\u7b97\u8853\u6f14\u7b97\u5b50\u304a\u3088\u3073\u30d3\u30c3\u30c8\u6f14\u7b97\u5b50\u304c\u9069\u7528\u3055\u308c\u305f\u5834\u5408\u306b\u540c\u3058\u52d5\u4f5c\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u914d\u5217\u3001\u30ea\u30bd\u30fc\u30b9\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u6f14\u7b97\u5bfe\u8c61\u306b\u5bfe\u3057\u3066 <code>TypeError<\/code>\u306e\u4f8b\u5916\u3092\u767a\u751f\u3055\u305b\u307e\u3059\u3002<\/strong><\/p>\n<h2 id=\"new-php-functions\">\u65b0\u3057\u3044PHP\u95a2\u6570<\/h2>\n<p>PHP 8\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u65b0\u3057\u3044\u95a2\u6570\u3092\u3082\u305f\u3089\u3057\u307e\u3059\u3002<\/p>\n<div><\/div><kinsta-auto-toc list-style=\"disc\" selector=\"h3\" count-number=\"-1\" sub-toc=\"true\"><\/kinsta-auto-toc>\n<h3 id=\"str_contains\">str_contains<\/h3>\n<p>PHP 8\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3001<a href=\"https:\/\/kinsta.com\/jp\/blog\/hire-wordpress-developer\/\">\u958b\u767a\u8005<\/a>\u304c\u7279\u5b9a\u306e\u6587\u5b57\u5217\u5185\u3067 needle\u3092\u691c\u7d22\u3057\u305f\u3068\u304d\u306b\u6700\u3082\u3088\u304f\u4f7f\u7528\u3055\u308c\u305f\u3082\u306e\u306f<a href=\"https:\/\/www.php.net\/manual\/en\/function.strstr.php\">strstr<\/a>\u3068<a href=\"https:\/\/www.php.net\/manual\/en\/function.strpos.php\">strpos<\/a>\u3067\u3057\u305f\u3002\u4e00\u65b9\u3001\u3069\u3061\u3089\u306e\u95a2\u6570\u3082\u76f4\u611f\u7684\u3067\u306a\u3044\u3082\u306e\u3067\u3001\u305d\u306e\u4f7f\u7528\u304c\u65b0\u4eba\u306ePHP\u958b\u767a\u8005\u306b\u3068\u3063\u3066\u96e3\u3057\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u6b21\u306e\u4f8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-php\">$mystring = 'Managed WordPress Hosting';\n$findme = 'WordPress';\n$pos = strpos($mystring, $findme);\n\nif ($pos !== false) {\n\techo \"The string has been found\";\n} else {\n\techo \"String not found\";\n}<\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u4f8b\u3067\u306f\u30012\u3064\u306e\u5024\u304c\u540c\u3058\u578b\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u3082\u30c1\u30a7\u30c3\u30af\u3059\u308b<code>!==<\/code>\u6bd4\u8f03\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001<a href=\"https:\/\/www.php.net\/manual\/en\/function.strpos.php#refsect1-function.strpos-returnvalues\">needle\u306e\u4f4d\u7f6e\u304c0<\/a>\u306e\u5834\u5408\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<blockquote><p>\u3053\u306e\u95a2\u6570\u306f\u8ad6\u7406\u5024 <strong>FALSE<\/strong>,\u3092\u8fd4\u3059\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u304c\u3001<strong>FALSE<\/strong>\u3068\u3057\u3066\u8a55\u4fa1\u3055\u308c\u308b\u5024\u3092\u8fd4\u3059\u53ef\u80fd\u6027\u3082\u3042\u308a\u307e\u3059\u3002[&#8230;]\u3053\u306e\u95a2\u6570\u306e\u8fd4\u308a\u5024\u3092\u8abf\u3079\u308b\u306b\u306f ===\u6f14\u7b97\u5b50 \u3092 \u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044<\/p><\/blockquote>\n<p>\u3055\u3089\u306b\u3001\u7279\u5b9a\u306e\u6587\u5b57\u5217\u5185\u306e\u5024\u3092\u691c\u7d22\u3059\u308b\u30d8\u30eb\u30d1\u30fc\u95a2\u6570\u3092\u63d0\u4f9b\u3059\u308b\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u304c\u591a\u3044\u3067\u3059\u3002\uff08\u4f8b\u3048\u3070\u3001<a href=\"https:\/\/laravel.com\/docs\/7.x\/helpers#method-str-contains\">Laravel Helpers\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002\uff09<\/p>\n<p>\u305d\u3053\u3067\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/str_contains\">\u3053\u306eRFC<\/a>\u3067\u306f\u3001\u6587\u5b57\u5217\u5185\u3092\u691c\u7d22\u3067\u304d\u308b\u65b0\u3057\u3044\u95a2\u6570<code>str_contains<\/code>\u306e\u5c0e\u5165\u304c\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">str_contains ( string $haystack , string $needle ) : bool<\/code><\/pre>\n<p>\u4f7f\u3044\u65b9\u306f\u304b\u306a\u308a\u7c21\u5358\u3067\u3059\u3002<code>str_contains<\/code>\u306f\u3001<code>$needle<\/code>\u304c<code>$haystack<\/code>\u306b\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u3001\u305d\u308c\u306b\u5fdc\u3058\u3066<code>true<\/code>\u307e\u305f\u306f<code>false<\/code>\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u3057\u305f\u304c\u3063\u3066\u3001<code>str_contains<\/code>\u306e\u304a\u304b\u3052\u3067\u3001\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">$mystring = 'Managed WordPress Hosting';\n$findme   = 'WordPress';\n\nif (str_contains($mystring, $findme)) {\n\techo \"The string has been found\";\n} else {\n\techo \"String not found\";\n}<\/code><\/pre>\n<p>\u4e0a\u8a18\u306f\u3001\u3088\u308a\u8aad\u307f\u3084\u3059\u304f\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u306b\u304f\u3044\u3082\u306e\u3067\u3059\u3002\uff08\u5b9f\u884c\u4e2d\u306e\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/3v4l.org\/rcmEq\/rfc#git-php-master\">\u3053\u3061\u3089<\/a>\u3092\u53c2\u7167\uff09\u3002<br \/>\n\u672c\u8a18\u4e8b\u306e\u57f7\u7b46\u6642\u70b9\u3067\u3001<code>str_contains<\/code>\u306f\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u307e\u3059\u304c\u3001\u3053\u306e\u7279\u5fb4\u304c\u5c06\u6765\u7684\u306b\u5909\u66f4\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><code>str_contains<\/code>\u306e\u63d0\u6848\u306f43\u5bfe9\u306e\u6295\u7968\u3067\u53ef\u6c7a\u3057\u307e\u3057\u305f\u3002<\/p>\n<h3 id=\"str_starts_with-and-str_ends_with\">str_starts_with()\u304a\u3088\u3073str_ends_with()<\/h3>\n<p>str_contains\u95a2\u6570\u306b\u52a0\u3048\u3066\u3001<code>str_starts_with<\/code> \u53ca\u3073<code>str_ends_with<\/code>\u306e2\u3064\u306e\u65b0\u3057\u3044\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u3082\u3001\u6587\u5b57\u5217\u5185\u3067needle\u3092\u691c\u7d22\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/wiki.php.net\/rfc\/add_str_starts_with_and_ends_with_functions\">\u3053\u308c\u3089\u306e\u65b0\u3057\u3044\u95a2\u6570<\/a>\u306f\u3001\u6307\u5b9a\u3055\u308c\u305f\u6587\u5b57\u5217\u304c\u5225\u306e\u6587\u5b57\u5217\u3067\u59cb\u307e\u308b\u304b\uff0f\u7d42\u308f\u308b\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">str_starts_with (string $haystack , string $needle) : bool\nstr_ends_with (string $haystack , string $needle) : bool<\/code><\/pre>\n<p><code>$needle<\/code>\u304c<code>$haystack<\/code>\u3088\u308a\u3082\u9577\u3044\u5834\u5408\u3001\u3069\u3061\u3089\u306e\u95a2\u6570\u3082<code>false<\/code>\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306eRFC\u306e\u4f5c\u8005\u3067\u3042\u308bWill Hudgins\u306f\u6b21\u306e\u3088\u3046\u306b\u8ff0\u3079\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote><p><code>str_starts_with<\/code> \u53ca\u3073<code>str_ends_with<\/code>\u6a5f\u80fd\u306f\u975e\u5e38\u306b\u4e00\u822c\u7684\u306b\u5fc5\u8981\u3068\u3055\u308c\u308b\u3082\u306e\u3067\u3042\u308b\u305f\u3081\u3001<a href=\"https:\/\/symfony.com\/doc\/5.0\/components\/string.html#methods-to-search-and-replace\">Symfony<\/a>\u3001<a href=\"https:\/\/laravel.com\/docs\/7.x\/helpers#method-starts-with\">Laravel<\/a>\u3001<a href=\"https:\/\/www.yiiframework.com\/doc\/api\/2.0\/yii-helpers-basestringhelper#startsWith()-detail\">Yii<\/a>\u3001<a href=\"https:\/\/fuelphp.com\/docs\/classes\/str.html#\/method_starts_with\">FuelPHP<\/a>\u307e\u305f\u306f<a href=\"https:\/\/docs.phalcon.io\/3.4\/en\/api\/phalcon_text\">Phalcon<\/a>\u306a\u3069\u306e\u591a\u304f\u306e<a href=\"https:\/\/kinsta.com\/jp\/blog\/php-frameworks\/\">\u4e3b\u8981\u306aPHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af<\/a>\u3067\u65e2\u306b\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059<\/p><\/blockquote>\n<p>\u3053\u308c\u3089\u306e\u304a\u304b\u3052\u3067\u3001<code>substr<\/code>\u3084<code>strpos<\/code>\u306a\u3069\u306e\u4e0d\u5341\u5206\u3067\u76f4\u611f\u7684\u3067\u306a\u3044\u95a2\u6570\u306e\u4f7f\u7528\u3092\u56de\u907f\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u3069\u3061\u3089\u306e\u95a2\u6570\u3067\u3082\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u304c\u533a\u5225\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">$str = \"WordPress\";\nif (str_starts_with($str, \"Word\")) echo \"Found!\";\n\nif (str_starts_with($str, \"word\")) echo \"Not found!\";<\/code><\/pre>\n<p>\u5b9f\u884c\u4e2d\u306e\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/3v4l.org\/kBcjZ\/rfc#output\">\u3053\u3061\u3089<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u306eRFC\u306f51\u5bfe4\u306e\u6295\u7968\u3067\u53ef\u6c7a\u3057\u307e\u3057\u305f\u3002<\/p>\n<h3 id=\"get_debug_type\">get_debug_type<\/h3>\n<p>get_debug_type\u306f\u3001<a href=\"https:\/\/wiki.php.net\/rfc\/get_debug_type\">\u5909\u6570\u306e\u578b\u3092\u8fd4\u3059<\/a>\u65b0\u3057\u3044PHP\u95a2\u6570\u3067\u3059\u3002\u65b0\u3057\u3044\u95a2\u6570\u306f<a href=\"https:\/\/www.php.net\/manual\/en\/function.gettype.php\"><code>gettype<\/code> \u95a2\u6570<\/a>\u3068\u975e\u5e38\u306b\u3088\u304f\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001<code>get_debug_type<\/code>\u306f\u30cd\u30a4\u30c6\u30a3\u30d6\u306e\u578b\u540d\u3092\u8fd4\u3057\u3001\u30af\u30e9\u30b9\u540d\u3092\u89e3\u6c7a\u3057\u307e\u3059\u3002<\/p>\n<p><code>gettype()<\/code>\u306f\u578b\u30c1\u30a7\u30c3\u30af\u306b\u3042\u307e\u308a\u5f79\u7acb\u305f\u306a\u3044\u305f\u3081\u3001\u3053\u308c\u306f\u4fbf\u5229\u306a\u6539\u5584\u70b9\u3067\u3059\u3002<\/p>\n<p>RFC\u306b\u306f\u3001\u65b0\u3057\u3044<code>get_debug_type()<\/code>\u95a2\u6570\u3068<code>gettype()<\/code>\u306e\u9055\u3044\u3092\u3088\u308a\u3088\u304f\u7406\u89e3\u3067\u304d\u308b\u305f\u3081\u306b\u5f79\u7acb\u30642\u3064\u306e\u4f8b\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u6700\u521d\u306e\u4f8b\u306f\u3001\u5b9f\u884c\u4e2d\u306e<code>gettype<\/code>\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">$bar = [1,2,3];\n\nif (!($bar instanceof Foo)) { \n\tthrow new TypeError('Expected ' .Foo::class .', got ' .(is_object($bar) ? get_class($bar) : gettype($bar)));\n}<\/code><\/pre>\n<p>PHP 8\u3067\u306f\u3001\u4ee3\u308f\u308a\u306b<code>get_debug_type<\/code>\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">if (!($bar instanceof Foo)) { \n\tthrow new TypeError('Expected ' .Foo::class .' got ' . get_debug_type($bar));\n}<\/code><\/pre>\n<p>\u6b21\u306e\u8868\u306f\u3001<code>get_debug_type<\/code>\u53ca\u3073<code>gettype<\/code>\u306e\u623b\u308a\u5024\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u5024<\/th>\n<th>gettype()<\/th>\n<th>get_debug_type()<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>integer<\/td>\n<td>int<\/td>\n<\/tr>\n<tr>\n<td>0.1<\/td>\n<td>double<\/td>\n<td>float<\/td>\n<\/tr>\n<tr>\n<td>true<\/td>\n<td>boolean<\/td>\n<td>bool<\/td>\n<\/tr>\n<tr>\n<td>false<\/td>\n<td>boolean<\/td>\n<td>bool<\/td>\n<\/tr>\n<tr>\n<td>null<\/td>\n<td>NULL<\/td>\n<td>null<\/td>\n<\/tr>\n<tr>\n<td>&#8220;WordPress&#8221;<\/td>\n<td>string<\/td>\n<td>string<\/td>\n<\/tr>\n<tr>\n<td>[1,2,3]<\/td>\n<td>array<\/td>\n<td>array<\/td>\n<\/tr>\n<tr>\n<td>\u300cFoo \\ Bar\u300d\u3068\u3044\u3046\u540d\u524d\u306e\u30af\u30e9\u30b9<\/td>\n<td>object<\/td>\n<td>Foo\\Bar<\/td>\n<\/tr>\n<tr>\n<td>\u533f\u540d\u30af\u30e9\u30b9<\/td>\n<td>object<\/td>\n<td>class@anonymous<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"additional-rfcs\">\u305d\u306e\u4ed6\u306eRFC<\/h2>\n<p>PHP 8\u306e\u3067\u5c0e\u5165\u3055\u308c\u308b\u305d\u306e\u4ed6\u306e\u627f\u8a8d\u3055\u308c\u305f\u6539\u5584\u70b9\u306e\u4e00\u89a7\u3092\u4ee5\u4e0b\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li><strong>Stringable\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9<\/strong>\uff1a<a href=\"https:\/\/wiki.php.net\/rfc\/stringable\">\u3053\u306eRFC<\/a>\u3067\u306f\u3001<a href=\"https:\/\/www.php.net\/manual\/en\/language.oop5.magic.php#object.tostring\"><code>__to String()<\/code> \u30e1\u30bd\u30c3\u30c9<\/a>\u3092\u5b9f\u88c5\u3059\u308b\u30af\u30e9\u30b9\u306b\u81ea\u52d5\u7684\u306b\u8ffd\u52a0\u3055\u308c\u308bStringable\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u5c0e\u5165\u304c\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u3053\u3067\u306e\u4e3b\u306a\u76ee\u7684\u306f\u3001<code>string|Stringable<\/code>union\u578b\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/li>\n<li><strong>ext\/dom\u3067\u306eDOM Living Standard\u306e\u65b0\u3057\u3044API<\/strong>\uff1a<a href=\"https:\/\/wiki.php.net\/rfc\/dom_living_standard_api\">\u3053\u306eRFC<\/a>\u3067\u306f\u3001\u65b0\u3057\u3044\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3068\u30d1\u30d6\u30ea\u30c3\u30af\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u73fe\u5728\u306e <a href=\"https:\/\/dom.spec.whatwg.org\/\">DOM Living Standard<\/a>\u3092<a href=\"https:\/\/www.php.net\/manual\/en\/intro.dom.php\">PHP\u306eDOM\u62e1\u5f35\u6a5f\u80fd\u306b\u7d44\u307f\u8fbc\u3080<\/a>\u3053\u3068\u304c\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<li><strong>\u9759\u7684\u306a\u623b\u308a\u578b<\/strong>\uff1aPHP 8\u3067\u306f\u3001<code>self<\/code>\u578b \u3068<code>parent<\/code>\u578b\u306e\u4e26\u3073\u306b\u3001<code>static<\/code>\u578b\u3082\u623b\u308a\u578b\u3068\u3057\u3066\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/li>\n<li><strong>\u53ef\u5909\u69cb\u6587\u306e\u5fae\u8abf\u6574<\/strong>\uff1a<a href=\"https:\/\/wiki.php.net\/rfc\/variable_syntax_tweaks\">\u3053\u306eRFC<\/a>\u306f\u3001PHP\u306e\u53ef\u5909\u69cb\u6587\u306e\u53e4\u304f\u304b\u3089\u306e\u4e0d\u6574\u5408\u3092\u306a\u304f\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n<h2>PHP 8 \u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30d9\u30f3\u30c1\u30de\u30fc\u30af<\/h2>\n<p>PHP 8\u304c\u3069\u306e\u304f\u3089\u3044\u901f\u3044\u306e\u304b\u6c17\u306b\u306a\u308b\u65b9\u306e\u305f\u3081\u306b\u3001\u7b54\u3048\u3092\u7528\u610f\u3057\u307e\u3057\u305f\u3002<a href=\"https:\/\/kinsta.com\/jp\/blog\/php-benchmarks\/\">20\u306ePHP\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3084\u69cb\u6210<\/a>\u3092\u5bfe\u8c61\u306b\u30017\u3064\u306e\u7570\u306a\u308bPHP\u30d0\u30fc\u30b8\u30e7\u30f3(5.6\u30017.0\u30017.1\u30017.2\u30017.3\u30018.0)\u3092\u30d9\u30f3\u30c1\u30de\u30fc\u30af\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>WordPress\u3084Laravel\u306a\u3069\u3001PHP\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u307b\u3068\u3093\u3069\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067PHP 8.0\u304c\u30c1\u30e3\u30f3\u30d4\u30aa\u30f3\u3067\u3057\u305f\u3002<\/p>\n<figure id=\"attachment_88757\" aria-describedby=\"caption-attachment-88757\" style=\"width: 1100px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-88757\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2021\/02\/Kinsta-PHP-Benchmarks-2021-Compilation.png\" alt=\"\u4e0a\u4f4d\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u30d9\u30f3\u30c1\u30de\u30fc\u30af\u7d50\u679c\u306e\u307e\u3068\u3081\" width=\"1100\" height=\"799\"><figcaption id=\"caption-attachment-88757\" class=\"wp-caption-text\">\u4e0a\u4f4d\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u30d9\u30f3\u30c1\u30de\u30fc\u30af\u7d50\u679c\u306e\u307e\u3068\u3081<\/figcaption><\/figure>\n<p>PHP 8.0\u4e0a\u306eWordPress\u306fPHP 7.4\u4e0a\u3088\u308a\u3082\u30011\u79d2\u3042\u305f\u308a<strong>18.4%<\/strong>\u591a\u304f\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u51e6\u7406\u3067\u304d\u307e\u3059\u3002\u305d\u3057\u3066Laravel\u3082\u3001PHP 7.3\u3068\u6bd4\u8f03\u3057\u30661\u79d2\u9593\u306b<strong>8.5%<\/strong>\u591a\u304f\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u51e6\u7406\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\u3001\u3042\u306a\u305f\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3084\u30a2\u30d7\u30ea\u304cPHP 8.0\u306b\u5b8c\u5168\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u306e\u3067\u3042\u308c\u3070\u3001\u3067\u304d\u308b\u3060\u3051\u65e9\u304f<a href=\"https:\/\/kinsta.com\/jp\/changelog\/php-8\/\">\u30b5\u30fc\u30d0\u30fc\u306e\u74b0\u5883\u3092PHP 8.0\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8<\/a>\u3057\u305f\u65b9\u304c\u826f\u3044\u3067\u3057\u3087\u3046\u3002\u3042\u306a\u305f\u3082\u3001\u305d\u3057\u3066\u3042\u306a\u305f\u306e\u30e6\u30fc\u30b6\u30fc\u3082\u9593\u9055\u3044\u306a\u304f\u3001\u305d\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u4e0a\u306e\u30e1\u30ea\u30c3\u30c8\u3092\u4eab\u53d7\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u3002\u305f\u3060\u3057\u3001\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u524d\u306b\u306f\u3001\u30b5\u30a4\u30c8\u3092\u5fb9\u5e95\u7684\u306b\u30c6\u30b9\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u8a73\u7d30\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c7\u30fc\u30bf\u3001\u305d\u306e\u5206\u6790\u3001\u307e\u305f\u306f\u304d\u308c\u3044\u306a\u30b0\u30e9\u30d5\u306a\u3069\u306b\u3064\u3044\u3066\u306f\u3001\u5f53\u793e\u306e<a href=\"https:\/\/kinsta.com\/jp\/blog\/php-benchmarks\/\">PHP\u30d9\u30f3\u30c1\u30de\u30fc\u30af\u306e\u8a18\u4e8b<\/a>\u3092\u304a\u8aad\u307f\u304f\u3060\u3055\u3044\u3002<\/p>\n\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u3046\u308f\u3041\uff01\u672c\u8a18\u4e8b\u3067\u306f\u3001PHP 8\u3067\u5c0e\u5165\u3055\u308c\u308b\u6700\u3082\u8208\u5473\u6df1\u3044\u6700\u9069\u5316\u3084\u65b0\u6a5f\u80fd\u3092\u53d6\u308a\u4e0a\u3052\u307e\u3057\u305f\u3002\u6700\u3082\u671f\u5f85\u3055\u308c\u3066\u3044\u308b\u65b0\u6a5f\u80fd\u306f\u3001\u78ba\u304b\u306b\u30b8\u30e3\u30b9\u30c8\u30a4\u30f3\u30bf\u30a4\u30e0\u30fb\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\u3067\u3059\u304c\u3001PHP 8\u306b\u306f\u305d\u308c\u4ee5\u5916\u306b\u3082\u591a\u304f\u306e\u6a5f\u80fd\u304c\u542b\u307e\u308c\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u672c\u8a18\u4e8b\u3092\u5fc5\u305a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002\ud83e\udd13<\/p>\n<p>\u6b21\u306f\u3042\u306a\u305f\u306e\u756a\u3067\u3059\u3002PHP\u306e\u4e88\u5b9a\u3055\u308c\u3066\u3044\u308b\u6a5f\u80fd\u3092\u8a66\u9a13\u3059\u308b\u6e96\u5099\u306f\u3067\u304d\u3066\u3044\u307e\u3059\u304b\uff1f\u304a\u597d\u307f\u306e\u65b0\u6a5f\u80fd\u306f\u4f55\u3067\u3059\u304b\uff1f\u4e0b\u8a18\u306e\u30b3\u30e1\u30f3\u30c8\u6b04\u3067\u304a\u77e5\u3089\u305b\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP 8\u304c2020\u5e7411\u670826\u65e5\u306b\u6b63\u5f0f\u306bGA\u30ea\u30ea\u30fc &#8230;<\/p>\n","protected":false},"author":36,"featured_media":28195,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kinsta_gated_content":false,"_kinsta_gated_content_redirect":"","footnotes":""},"tags":[40,45],"topic":[798],"class_list":["post-28194","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-php","tag-webdev","topic-php-updates"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v24.6 (Yoast SEO v24.6) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP 8\u306e\u65b0\u6a5f\u80fd\uff08\u65b0\u6a5f\u80fd\u3001\u6539\u5584\u70b9\u3001\u304a\u3088\u3073JIT\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\uff09<\/title>\n<meta name=\"description\" content=\"PHP 8\u306f\u30012020\u5e7412\u67083\u65e5\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\u3002\u65b0\u3057\u3044\u6a5f\u80fd\u3001\u63a8\u5968\u3055\u308c\u306a\u304f\u306a\u308b\u3082\u306e\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u3092\u3082\u305f\u3089\u3057\u307e\u3059\u3002PHP 8\u306e\u65b0\u6a5f\u80fd\u3092\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\uff01\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kinsta.com\/jp\/blog\/php-8\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP 8\u306e\u65b0\u6a5f\u80fd\uff08\u65b0\u6a5f\u80fd\u3001\u6539\u5584\u70b9\u3001\u304a\u3088\u3073JIT\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\uff09\" \/>\n<meta property=\"og:description\" content=\"PHP 8\u306f\u30012020\u5e7412\u67083\u65e5\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\u3002\u65b0\u3057\u3044\u6a5f\u80fd\u3001\u63a8\u5968\u3055\u308c\u306a\u304f\u306a\u308b\u3082\u306e\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u3092\u3082\u305f\u3089\u3057\u307e\u3059\u3002PHP 8\u306e\u65b0\u6a5f\u80fd\u3092\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\uff01\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kinsta.com\/jp\/blog\/php-8\/\" \/>\n<meta property=\"og:site_name\" content=\"Kinsta\u00ae\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Kinsta-Japan-334616080691171\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-27T07:48:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-01T13:42:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2020\/05\/php-8-1024x512-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Carlo Daniele\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:description\" content=\"PHP 8\u306f\u30012020\u5e7412\u67083\u65e5\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\u3002\u65b0\u3057\u3044\u6a5f\u80fd\u3001\u63a8\u5968\u3055\u308c\u306a\u304f\u306a\u308b\u3082\u306e\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u3092\u3082\u305f\u3089\u3057\u307e\u3059\u3002PHP 8\u306e\u65b0\u6a5f\u80fd\u3092\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\uff01\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2020\/05\/php-8-1024x512-1.jpg\" \/>\n<meta name=\"twitter:creator\" content=\"@carlodaniele\" \/>\n<meta name=\"twitter:site\" content=\"@Kinsta_JP\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Carlo Daniele\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"11\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/php-8\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/php-8\/\"},\"author\":{\"name\":\"Carlo Daniele\",\"@id\":\"https:\/\/kinsta.com\/jp\/#\/schema\/person\/962dde02ea6f5df089b5d8d0853bbc63\"},\"headline\":\"PHP 8\u306e\u65b0\u6a5f\u80fd\uff08\u65b0\u6a5f\u80fd\u3001\u6539\u5584\u70b9\u3001\u304a\u3088\u3073JIT\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\uff09\",\"datePublished\":\"2020-05-27T07:48:34+00:00\",\"dateModified\":\"2024-03-01T13:42:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/php-8\/\"},\"wordCount\":578,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kinsta.com\/jp\/#organization\"},\"image\":{\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/php-8\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2020\/05\/php-8-1024x512-1.jpg\",\"keywords\":[\"php\",\"webdev\"],\"articleSection\":[\"WordPress\u958b\u767a\"],\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kinsta.com\/jp\/blog\/php-8\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/php-8\/\",\"url\":\"https:\/\/kinsta.com\/jp\/blog\/php-8\/\",\"name\":\"PHP 8\u306e\u65b0\u6a5f\u80fd\uff08\u65b0\u6a5f\u80fd\u3001\u6539\u5584\u70b9\u3001\u304a\u3088\u3073JIT\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\uff09\",\"isPartOf\":{\"@id\":\"https:\/\/kinsta.com\/jp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/php-8\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/php-8\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2020\/05\/php-8-1024x512-1.jpg\",\"datePublished\":\"2020-05-27T07:48:34+00:00\",\"dateModified\":\"2024-03-01T13:42:40+00:00\",\"description\":\"PHP 8\u306f\u30012020\u5e7412\u67083\u65e5\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\u3002\u65b0\u3057\u3044\u6a5f\u80fd\u3001\u63a8\u5968\u3055\u308c\u306a\u304f\u306a\u308b\u3082\u306e\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u3092\u3082\u305f\u3089\u3057\u307e\u3059\u3002PHP 8\u306e\u65b0\u6a5f\u80fd\u3092\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\uff01\",\"breadcrumb\":{\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/php-8\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kinsta.com\/jp\/blog\/php-8\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/php-8\/#primaryimage\",\"url\":\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2020\/05\/php-8-1024x512-1.jpg\",\"contentUrl\":\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2020\/05\/php-8-1024x512-1.jpg\",\"width\":1024,\"height\":512},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/php-8\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/kinsta.com\/jp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP\u66f4\u65b0\u60c5\u5831\",\"item\":\"https:\/\/kinsta.com\/jp\/topics\/php-updates\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"PHP 8\u306e\u65b0\u6a5f\u80fd\uff08\u65b0\u6a5f\u80fd\u3001\u6539\u5584\u70b9\u3001\u304a\u3088\u3073JIT\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kinsta.com\/jp\/#website\",\"url\":\"https:\/\/kinsta.com\/jp\/\",\"name\":\"Kinsta\u00ae\",\"description\":\"\u9ad8\u901f\u304b\u3064\u5805\u7262\u306a\u30d7\u30ec\u30df\u30a2\u30e0\u30b5\u30fc\u30d0\u30fc\u30b5\u30fc\u30d3\u30b9\",\"publisher\":{\"@id\":\"https:\/\/kinsta.com\/jp\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kinsta.com\/jp\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kinsta.com\/jp\/#organization\",\"name\":\"Kinsta\",\"url\":\"https:\/\/kinsta.com\/jp\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/kinsta.com\/jp\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/12\/kinsta-logo.jpeg\",\"contentUrl\":\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/12\/kinsta-logo.jpeg\",\"width\":500,\"height\":500,\"caption\":\"Kinsta\"},\"image\":{\"@id\":\"https:\/\/kinsta.com\/jp\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Kinsta-Japan-334616080691171\/\",\"https:\/\/x.com\/Kinsta_JP\",\"https:\/\/www.instagram.com\/kinstahosting\/\",\"https:\/\/www.linkedin.com\/company\/kinsta\/\",\"https:\/\/www.pinterest.com\/kinstahosting\/\",\"https:\/\/www.youtube.com\/c\/Kinsta\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/kinsta.com\/jp\/#\/schema\/person\/962dde02ea6f5df089b5d8d0853bbc63\",\"name\":\"Carlo Daniele\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/kinsta.com\/jp\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/429e5568f88110fd9a409b84cb22197e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/429e5568f88110fd9a409b84cb22197e?s=96&d=mm&r=g\",\"caption\":\"Carlo Daniele\"},\"description\":\"Carlo is a passionate lover of webdesign and front-end development. He has been playing with WordPress for more than 20 years, also in collaboration with Italian and European universities and educational institutions. He has written hundreds of articles and guides about WordPress, published both on Italian and international websites, as well as on printed magazines. You can find him on LinkedIn.\",\"sameAs\":[\"https:\/\/frammentidicodice.com\/\",\"https:\/\/x.com\/carlodaniele\"],\"url\":\"https:\/\/kinsta.com\/jp\/blog\/author\/carlodaniele\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PHP 8\u306e\u65b0\u6a5f\u80fd\uff08\u65b0\u6a5f\u80fd\u3001\u6539\u5584\u70b9\u3001\u304a\u3088\u3073JIT\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\uff09","description":"PHP 8\u306f\u30012020\u5e7412\u67083\u65e5\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\u3002\u65b0\u3057\u3044\u6a5f\u80fd\u3001\u63a8\u5968\u3055\u308c\u306a\u304f\u306a\u308b\u3082\u306e\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u3092\u3082\u305f\u3089\u3057\u307e\u3059\u3002PHP 8\u306e\u65b0\u6a5f\u80fd\u3092\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\uff01","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:\/\/kinsta.com\/jp\/blog\/php-8\/","og_locale":"ja_JP","og_type":"article","og_title":"PHP 8\u306e\u65b0\u6a5f\u80fd\uff08\u65b0\u6a5f\u80fd\u3001\u6539\u5584\u70b9\u3001\u304a\u3088\u3073JIT\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\uff09","og_description":"PHP 8\u306f\u30012020\u5e7412\u67083\u65e5\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\u3002\u65b0\u3057\u3044\u6a5f\u80fd\u3001\u63a8\u5968\u3055\u308c\u306a\u304f\u306a\u308b\u3082\u306e\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u3092\u3082\u305f\u3089\u3057\u307e\u3059\u3002PHP 8\u306e\u65b0\u6a5f\u80fd\u3092\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\uff01","og_url":"https:\/\/kinsta.com\/jp\/blog\/php-8\/","og_site_name":"Kinsta\u00ae","article_publisher":"https:\/\/www.facebook.com\/Kinsta-Japan-334616080691171\/","article_published_time":"2020-05-27T07:48:34+00:00","article_modified_time":"2024-03-01T13:42:40+00:00","og_image":[{"width":1024,"height":512,"url":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2020\/05\/php-8-1024x512-1.jpg","type":"image\/jpeg"}],"author":"Carlo Daniele","twitter_card":"summary_large_image","twitter_description":"PHP 8\u306f\u30012020\u5e7412\u67083\u65e5\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\u3002\u65b0\u3057\u3044\u6a5f\u80fd\u3001\u63a8\u5968\u3055\u308c\u306a\u304f\u306a\u308b\u3082\u306e\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u3092\u3082\u305f\u3089\u3057\u307e\u3059\u3002PHP 8\u306e\u65b0\u6a5f\u80fd\u3092\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\uff01","twitter_image":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2020\/05\/php-8-1024x512-1.jpg","twitter_creator":"@carlodaniele","twitter_site":"@Kinsta_JP","twitter_misc":{"\u57f7\u7b46\u8005":"Carlo Daniele","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"11\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kinsta.com\/jp\/blog\/php-8\/#article","isPartOf":{"@id":"https:\/\/kinsta.com\/jp\/blog\/php-8\/"},"author":{"name":"Carlo Daniele","@id":"https:\/\/kinsta.com\/jp\/#\/schema\/person\/962dde02ea6f5df089b5d8d0853bbc63"},"headline":"PHP 8\u306e\u65b0\u6a5f\u80fd\uff08\u65b0\u6a5f\u80fd\u3001\u6539\u5584\u70b9\u3001\u304a\u3088\u3073JIT\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\uff09","datePublished":"2020-05-27T07:48:34+00:00","dateModified":"2024-03-01T13:42:40+00:00","mainEntityOfPage":{"@id":"https:\/\/kinsta.com\/jp\/blog\/php-8\/"},"wordCount":578,"commentCount":0,"publisher":{"@id":"https:\/\/kinsta.com\/jp\/#organization"},"image":{"@id":"https:\/\/kinsta.com\/jp\/blog\/php-8\/#primaryimage"},"thumbnailUrl":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2020\/05\/php-8-1024x512-1.jpg","keywords":["php","webdev"],"articleSection":["WordPress\u958b\u767a"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kinsta.com\/jp\/blog\/php-8\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kinsta.com\/jp\/blog\/php-8\/","url":"https:\/\/kinsta.com\/jp\/blog\/php-8\/","name":"PHP 8\u306e\u65b0\u6a5f\u80fd\uff08\u65b0\u6a5f\u80fd\u3001\u6539\u5584\u70b9\u3001\u304a\u3088\u3073JIT\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\uff09","isPartOf":{"@id":"https:\/\/kinsta.com\/jp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kinsta.com\/jp\/blog\/php-8\/#primaryimage"},"image":{"@id":"https:\/\/kinsta.com\/jp\/blog\/php-8\/#primaryimage"},"thumbnailUrl":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2020\/05\/php-8-1024x512-1.jpg","datePublished":"2020-05-27T07:48:34+00:00","dateModified":"2024-03-01T13:42:40+00:00","description":"PHP 8\u306f\u30012020\u5e7412\u67083\u65e5\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\u3002\u65b0\u3057\u3044\u6a5f\u80fd\u3001\u63a8\u5968\u3055\u308c\u306a\u304f\u306a\u308b\u3082\u306e\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u3092\u3082\u305f\u3089\u3057\u307e\u3059\u3002PHP 8\u306e\u65b0\u6a5f\u80fd\u3092\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\uff01","breadcrumb":{"@id":"https:\/\/kinsta.com\/jp\/blog\/php-8\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kinsta.com\/jp\/blog\/php-8\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/kinsta.com\/jp\/blog\/php-8\/#primaryimage","url":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2020\/05\/php-8-1024x512-1.jpg","contentUrl":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2020\/05\/php-8-1024x512-1.jpg","width":1024,"height":512},{"@type":"BreadcrumbList","@id":"https:\/\/kinsta.com\/jp\/blog\/php-8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kinsta.com\/jp\/"},{"@type":"ListItem","position":2,"name":"PHP\u66f4\u65b0\u60c5\u5831","item":"https:\/\/kinsta.com\/jp\/topics\/php-updates\/"},{"@type":"ListItem","position":3,"name":"PHP 8\u306e\u65b0\u6a5f\u80fd\uff08\u65b0\u6a5f\u80fd\u3001\u6539\u5584\u70b9\u3001\u304a\u3088\u3073JIT\u30b3\u30f3\u30d1\u30a4\u30e9\u30fc\uff09"}]},{"@type":"WebSite","@id":"https:\/\/kinsta.com\/jp\/#website","url":"https:\/\/kinsta.com\/jp\/","name":"Kinsta\u00ae","description":"\u9ad8\u901f\u304b\u3064\u5805\u7262\u306a\u30d7\u30ec\u30df\u30a2\u30e0\u30b5\u30fc\u30d0\u30fc\u30b5\u30fc\u30d3\u30b9","publisher":{"@id":"https:\/\/kinsta.com\/jp\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kinsta.com\/jp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/kinsta.com\/jp\/#organization","name":"Kinsta","url":"https:\/\/kinsta.com\/jp\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/kinsta.com\/jp\/#\/schema\/logo\/image\/","url":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/12\/kinsta-logo.jpeg","contentUrl":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/12\/kinsta-logo.jpeg","width":500,"height":500,"caption":"Kinsta"},"image":{"@id":"https:\/\/kinsta.com\/jp\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Kinsta-Japan-334616080691171\/","https:\/\/x.com\/Kinsta_JP","https:\/\/www.instagram.com\/kinstahosting\/","https:\/\/www.linkedin.com\/company\/kinsta\/","https:\/\/www.pinterest.com\/kinstahosting\/","https:\/\/www.youtube.com\/c\/Kinsta"]},{"@type":"Person","@id":"https:\/\/kinsta.com\/jp\/#\/schema\/person\/962dde02ea6f5df089b5d8d0853bbc63","name":"Carlo Daniele","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/kinsta.com\/jp\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/429e5568f88110fd9a409b84cb22197e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/429e5568f88110fd9a409b84cb22197e?s=96&d=mm&r=g","caption":"Carlo Daniele"},"description":"Carlo is a passionate lover of webdesign and front-end development. He has been playing with WordPress for more than 20 years, also in collaboration with Italian and European universities and educational institutions. He has written hundreds of articles and guides about WordPress, published both on Italian and international websites, as well as on printed magazines. You can find him on LinkedIn.","sameAs":["https:\/\/frammentidicodice.com\/","https:\/\/x.com\/carlodaniele"],"url":"https:\/\/kinsta.com\/jp\/blog\/author\/carlodaniele\/"}]}},"acf":[],"_links":{"self":[{"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/posts\/28194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/users\/36"}],"replies":[{"embeddable":true,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/comments?post=28194"}],"version-history":[{"count":13,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/posts\/28194\/revisions"}],"predecessor-version":[{"id":55511,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/posts\/28194\/revisions\/55511"}],"alternate":[{"embeddable":true,"hreflang":"en","title":"English","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/28194\/translations\/en"},{"embeddable":true,"hreflang":"es","title":"Spanish","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/28194\/translations\/es"},{"embeddable":true,"hreflang":"it","title":"Italian","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/28194\/translations\/it"},{"embeddable":true,"hreflang":"pt","title":"Portuguese","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/28194\/translations\/pt"},{"embeddable":true,"hreflang":"ja","title":"Japanese","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/28194\/translations\/jp"},{"embeddable":true,"hreflang":"fr","title":"French","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/28194\/translations\/fr"},{"embeddable":true,"hreflang":"de","title":"German","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/28194\/translations\/de"},{"embeddable":true,"hreflang":"nl","title":"Dutch","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/28194\/translations\/nl"},{"embeddable":true,"hreflang":"da","title":"Danish","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/28194\/translations\/dk"},{"embeddable":true,"hreflang":"sv","title":"Swedish","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/28194\/translations\/se"},{"href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/28194\/tree"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/media\/28195"}],"wp:attachment":[{"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/media?parent=28194"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/tags?post=28194"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/topic?post=28194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}