{"id":30541,"date":"2023-03-31T04:30:05","date_gmt":"2023-02-15T09:46:50","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/"},"modified":"2025-08-12T19:40:00","modified_gmt":"2025-08-12T11:40:00","slug":"%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/","title":{"rendered":"\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f"},"content":{"rendered":"<p>2020\/06\/26\u9644\u8a00\uff1a\u7531\u4e8eAlpha\u7248\u5df2\u53d1\u5e03\uff0c\u6211\u5c1d\u8bd5\u4e86\u5b9e\u9645\u4f7f\u7528\u3002<\/p>\n<p>JIT\u7684RFC\u4e8e2019\u5e743\u670821\u65e5\u5f00\u59cb\u6295\u7968\u3002<br \/>\n\u622a\u6b62\u65e5\u671f\u4e3a2019\u5e743\u670828\u65e5\uff0c\u4f46\u622a\u81f32019\u5e743\u670827\u65e5\uff0c\u8d5e\u6210\u7968\u4e3a48\u7968\uff0c\u53cd\u5bf9\u7968\u4e3a2\u7968\uff0c\u51e0\u4e4e\u5df2\u786e\u5b9a\u5c06\u88ab\u91c7\u7eb3\u3002<\/p>\n<h1>\u5373\u65f6\u7f16\u8bd1 (JIT) \u662f\u4e00\u79cd\u6280\u672f\u3002<\/p>\n<h2>JIT \u662f\u4ec0\u4e48\uff1f\u76ee\u524d\uff0cPHP\u662f\u4e00\u79cd\u89e3\u91ca\u578b\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u6bcf\u6b21\u63a5\u6536\u8bf7\u6c42\u65f6\u4f1a\u8bfb\u53d6\u5168\u90e8\u6e90\u4ee3\u7801\uff0c\u5c06\u5176\u8f6c\u6362\u4e3aopcode\uff0c\u7136\u540e\u6309\u987a\u5e8f\u9010\u4e00\u6267\u884c\uff0c\u6267\u884c\u5b8c\u6210\u540e\u5c06\u4e22\u5f03\u6240\u6709\u4ee3\u7801\u3002\u867d\u7136\u8bf4\u5b83\u901f\u5ea6\u8f83\u6162\uff0c\u4f46\u4ece\u6267\u884c\u5185\u5bb9\u6765\u770b\uff0c\u5176\u901f\u5ea6\u5b9e\u9645\u4e0a\u662f\u5f02\u5e38\u5730\u5feb\u3002<\/p>\n<p>\u65e0\u8bba\u662fCPU\u3001\u64cd\u4f5c\u7cfb\u7edf\u8fd8\u662f\u5176\u4ed6\u6267\u884c\u73af\u5883\uff0copcode\u90fd\u4f1a\u751f\u6210\u76f8\u540c\u7684\u4ee3\u7801\u3002<br \/>\n\u5f53\u6309\u987a\u5e8f\u6267\u884c\u65f6\uff0c\u4f1a\u5c06\u5176\u8f6c\u6362\u4e3a\u7279\u5b9a\u6267\u884c\u73af\u5883\u7684\u672c\u5730\u4ee3\u7801\u5e76\u6267\u884c\u3002<br \/>\nOPcache\u4f1a\u5c06\u8f6c\u6362\u540e\u7684opcode\u5b58\u50a8\u5728\u5185\u5b58\u4e2d\uff0c\u4ee5\u4fbf\u5728\u4e0b\u4e00\u6b21\u8bf7\u6c42\u4e2d\u91cd\u590d\u4f7f\u7528\u3002<\/p>\n<p>JIT\u5df2\u7ecf\u8fdb\u4e00\u6b65\u53d1\u5c55\uff0c\u5f53\u8bf7\u6c42\u5230\u6765\u65f6\uff0c\u5b83\u4f1a\u8bfb\u53d6\u6e90\u4ee3\u7801\u5e76\u8f6c\u6362\u4e3aopcode\uff0c\u4f46\u4e4b\u540e\u4f1a\u7acb\u5373\u5c06\u5176\u8f6c\u6362\u4e3a\u672c\u673a\u4ee3\u7801\u3002<br \/>\n\u5f53\u518d\u6b21\u8c03\u7528\u76f8\u540c\u7684\u5904\u7406\u65f6\uff0c\u901a\u8fc7\u76f4\u63a5\u6267\u884c\u672c\u673a\u4ee3\u7801\uff0c\u5904\u7406\u901f\u5ea6\u4f1a\u6781\u5feb\u3002<br \/>\n\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u5c06\u8fd9\u4e9b\u672c\u673a\u4ee3\u7801\u4fdd\u5b58\u5728\u5185\u5b58\u4e2d\u4ee5\u4fbf\u91cd\u590d\u4f7f\u7528\u3002<\/p>\n<p>\u7136\u800c\uff0c\u7531\u4e8e\u672c\u5730\u4ee3\u7801\u662fCPU\u76f4\u63a5\u6267\u884c\u7684\u4ee3\u7801\uff0c\u56e0\u6b64\u5b83\u4f1a\u56e0CPU\u7c7b\u578b\u548c\u4ee3\u9645\u800c\u5f02\u3002\u6839\u636e\u6267\u884c\u73af\u5883\u9700\u8981\u521b\u5efa\u4e0d\u540c\u7684\u672c\u5730\u4ee3\u7801\uff0c\u8fd9\u5c31\u9700\u8981\u8fdb\u884c\u5927\u89c4\u6a21\u7684\u4fee\u6539\uff0c\u4ee3\u7801\u4e5f\u4f1a\u53d8\u5f97\u975e\u5e38\u590d\u6742\u3002\u800c\u8fd9\u79cd\u5927\u89c4\u6a21\u7684\u6539\u52a8\u662f\u4ec0\u4e48\u7a0b\u5ea6\u7684\u5462\uff1f\u5c31\u50cf\u8ba9\u4eba\u6655\u7729\u7684900\u6b21\u63d0\u4ea4\u548c5\u4e07\u884c\u7684\u6dfb\u52a0\u91cf\u4e00\u6837\u3002<\/p>\n<h2>\u7b80\u800c\u8a00\u4e4b\uff0c\u662f\u4ec0\u4e48\u610f\u601d\uff1fOPcache\u771f\u5389\u5bb3\u3002<\/p>\n<h1>\u5373\u65f6\u7f16\u8bd1\u8bf7\u6c42\u4fe1\u606f\u3002<\/p>\n<h2>\u4ecb\u7ecd\u539f\u672c\u6253\u7b97\u5728PHP7\u4e2d\u5b9e\u73b0JIT\uff0c\u5e76\u4e14\u81ea2011\u5e74\u8d77Zend\uff08\u4e3b\u8981\u662fDmitry\uff09\u5c31\u4e00\u76f4\u5728\u5c1d\u8bd5\u5404\u79cd\u65b9\u6cd5\uff0c\u4f46\u7531\u4e8e\u79cd\u79cd\u539f\u56e0\uff0c\u6700\u7ec8\u6ca1\u6709\u5c06\u5176\u7eb3\u5165PHP7\u3002\u539f\u56e0\u662f\uff0c\u5f53\u65f6\u7684\u65b9\u6cd5\u5e76\u6ca1\u6709\u663e\u8457\u63d0\u9ad8\u6027\u80fd\uff0c\u53cd\u800c\u589e\u52a0\u4e86\u590d\u6742\u6027\uff0c\u800c\u4e14\u8fd8\u5f15\u5165\u4e86\u5f88\u591a\u9664\u4e86JIT\u4e4b\u5916\u7684\u6027\u80fd\u6539\u8fdb\u6280\u672f\u3002<\/p>\n<p>\u4e8b\u5b9e\u4e0a\uff0cPHP7\u8fdb\u884c\u4e86\u4ee4\u4eba\u60ca\u8bb6\u7684\u9ad8\u901f\u5316\u6539\u8fdb\uff0c\u5904\u7406\u65f6\u95f4\u6bd4PHP5\u51cf\u5c11\u4e86\u4e00\u534a\u4ee5\u4e0b\u3002\u5f53\u65f6\u7531\u4e8e\u4e13\u6ce8\u4e8e\u8fd9\u4e9b\u52a0\u901f\u6539\u8fdb\uff0c\u6ca1\u6709\u5f15\u5165JIT\u3002<\/p>\n<h2>\u5982\u4eca\u5bf9\u4e8eJIT\u7684\u6848\u4f8b\u5f53\u524d\u5728PHP\u4e2d\u5f15\u5165JIT\u6709\u4ee5\u4e0b\u9884\u671f\u4f18\u70b9\u3002<\/p>\n<p>\u9996\u5148\uff0c\u9664\u4e86JIT\u4e4b\u5916\u7684\u4f18\u5316\u7b56\u7565\u6b63\u5728\u9010\u6e10\u8fbe\u5230\u6781\u9650\u3002<br \/>\n\u6362\u53e5\u8bdd\u8bf4\uff0c\u5982\u679c\u4e0d\u4f7f\u7528JIT\uff0c\u5c31\u65e0\u6cd5\u5b9e\u73b0\u66f4\u9ad8\u7684\u52a0\u901f\u3002<\/p>\n<p>\u4e0b\u4e00\u6b65\uff0c\u901a\u8fc7\u5f15\u5165JIT\uff0c\u5c06PHP\u7528\u4e8e\u7f16\u5199\u9700\u8981\u5927\u91cf\u4f7f\u7528Web\u4ee5\u5916\u7684CPU\u8fdb\u884c\u5904\u7406\u7684\u9009\u62e9\u5c06\u53d8\u5f97\u66f4\u6709\u529b\u3002<\/p>\n<p>\u6700\u5f8c\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u5728PHP\u4e2d\u5f00\u53d1\u5185\u5efa\u51fd\u6570\uff0c\u800c\u4e0d\u662f\u9009\u62e9C\u8bed\u8a00\u6216\u8005\u7528C\u8bed\u8a00\u4f5c\u4e3a\u66ff\u4ee3\u3002\u8fd9\u5c06\u57fa\u672c\u4e0a\u4e0d\u4f1a\u53d7\u5230\u5f53\u524dPHP\u4e2d\u91c7\u7528\u6b64\u7b56\u7565\u6240\u9762\u4e34\u7684\u6027\u80fd\u4e0b\u964d\u95ee\u9898\u7684\u5f71\u54cd\u3002<br \/>\n\u6b64\u5916\uff0c\u5982\u679c\u57fa\u4e8ePHP\u5f00\u53d1\uff0c\u8bed\u8a00\u7ea7\u522b\u5c06\u5b89\u5168\u4fdd\u62a4\u4f60\u514d\u53d7\u4f7f\u7528C\u8bed\u8a00\u5f00\u53d1\u5e38\u5e38\u51fa\u73b0\u7684\u5185\u5b58\u7ba1\u7406\u548c\u6ea2\u51fa\u7b49\u95ee\u9898\u7684\u56f0\u6270\u3002<\/p>\n<h2>\u63d0\u6848 (T\u00ed&#8217;\u00e0n)\u6211\u4eec\u5728PHP8\u4e2d\u63d0\u4f9b\u5373\u65f6\u7f16\u8bd1\uff08JIT\uff09\u529f\u80fd\u3002<\/p>\n<p>\u5728\u5176\u4e2dPHP JIT\u6210\u4e3aOPcache\u7684\u4e00\u90e8\u5206\uff0c\u4f46\u51e0\u4e4e\u662f\u4f5c\u4e3a\u72ec\u7acb\u5b9e\u73b0\u3002\u5728PHP\u7f16\u8bd1\u65f6\u8bbe\u7f6e\u5176\u6709\u6548\u6216\u65e0\u6548\u3002\u5982\u679c\u542f\u7528\uff0c\u5219PHP\u6587\u4ef6\u7684\u672c\u5730\u4ee3\u7801\u5c06\u88ab\u4fdd\u5b58\u5230OPCache\u7684\u5171\u4eab\u5185\u5b58\u4e2d\u3002<\/p>\n<p>\u751f\u6210\u539f\u751f\u4ee3\u7801\u65f6\uff0c\u4f7f\u7528DynAsm\u5de5\u5177\u3002\u8fd9\u662f\u4e00\u4e2a\u7531LuaJIT\u9879\u76ee\u5f00\u53d1\u7684\u975e\u5e38\u8f7b\u91cf\u7ea7\u548c\u9ad8\u7ea7\u7684\u5de5\u5177\u3002\u7136\u800c\uff0c\u540c\u65f6\u9700\u8981\u5bf9\u76ee\u6807\u6c47\u7f16\u8bed\u8a00\u6709\u9ad8\u7ea7\u7684\u7406\u89e3\u3002\u66fe\u7ecf\u5c1d\u8bd5\u8fc7LLVM\uff0c\u4f46\u662f\u4ee3\u7801\u751f\u6210\u901f\u5ea6\u6162\u4e86100\u500d\uff0c\u65e0\u6cd5\u4f7f\u7528\u3002DynAsm\u5728POSIX\u548cWindows\u4e0a\u652f\u6301x86\u3001x86_64\u548cARM\u3002\u56e0\u6b64\uff0c\u5e94\u8be5\u80fd\u591f\u652f\u6301\u5f53\u524dPHP\u6240\u652f\u6301\u7684\u5e38\u89c1\u5e73\u53f0\u3002\u53ea\u8981\u52aa\u529b\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u6211\u5728\u8fd9\u91cc\u63d0\u5230\u4e86\u4e00\u4e9b\u5173\u4e8e\u5185\u90e8\u5b9e\u73b0\u7684\u5185\u5bb9\uff0c\u4f46\u662f\u6211\u5e76\u4e0d\u592a\u7406\u89e3\u3002\u6bd4\u5982\u8bf4\u6ca1\u6709\u5bf9\u5e94additional IR form\uff0c\u6216\u8005opcache optimizer\u7684SSA\u9759\u6001\u5206\u6790\u6846\u67b6\u6b63\u5728\u751f\u6210\u672c\u5730\u4ee3\u7801\uff0c\u6216\u8005\u8bf4\u5f53\u8f6c\u5316\u4e3along\u578b\u540e\u4f1a\u76f4\u63a5\u6ce8\u518c\u5230CPU\u5bc4\u5b58\u5668\u800c\u4e0d\u662f\u5185\u5b58\u4e2d\uff0c\u8fd8\u6709PHP JIT\u7684\u5bc4\u5b58\u5668\u5206\u914d\u7b97\u6cd5\u975e\u5e38\u5389\u5bb3\u4e4b\u7c7b\u7684\uff0c\u6216\u8bb8\u6709\u8fd9\u6837\u7684\u5185\u5bb9\uff0c\u53c8\u6216\u8bb8\u6ca1\u6709\uff0c\u8be6\u7ec6\u60c5\u51b5\u8bf7\u53c2\u8003@sj-i\u5148\u751f\u7684\u8bc4\u8bba\u3002<\/p>\n<h2>\u6f14\u51fa\u8fd9\u4e2a\u51fd\u6570\u7684\u57fa\u51c6\u6d4b\u8bd5\u5df2\u7ecf\u516c\u5f00\u53d1\u5e03\u4e86\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"k\">function<\/span> <span class=\"n\">iterate<\/span><span class=\"p\">(<\/span><span class=\"nv\">$x<\/span><span class=\"p\">,<\/span><span class=\"nv\">$y<\/span><span class=\"p\">){<\/span>\r\n    <span class=\"nv\">$cr<\/span> <span class=\"o\">=<\/span> <span class=\"nv\">$y<\/span><span class=\"o\">-<\/span><span class=\"mf\">0.5<\/span><span class=\"p\">;<\/span>\r\n    <span class=\"nv\">$ci<\/span> <span class=\"o\">=<\/span> <span class=\"nv\">$x<\/span><span class=\"p\">;<\/span>\r\n    <span class=\"nv\">$zr<\/span> <span class=\"o\">=<\/span> <span class=\"mf\">0.0<\/span><span class=\"p\">;<\/span>\r\n    <span class=\"nv\">$zi<\/span> <span class=\"o\">=<\/span> <span class=\"mf\">0.0<\/span><span class=\"p\">;<\/span>\r\n    <span class=\"nv\">$i<\/span> <span class=\"o\">=<\/span> <span class=\"mi\">0<\/span><span class=\"p\">;<\/span>\r\n    <span class=\"k\">while<\/span> <span class=\"p\">(<\/span><span class=\"kc\">true<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\r\n        <span class=\"nv\">$i<\/span><span class=\"o\">++<\/span><span class=\"p\">;<\/span>\r\n        <span class=\"nv\">$temp<\/span> <span class=\"o\">=<\/span> <span class=\"nv\">$zr<\/span> <span class=\"o\">*<\/span> <span class=\"nv\">$zi<\/span><span class=\"p\">;<\/span>\r\n        <span class=\"nv\">$zr2<\/span> <span class=\"o\">=<\/span> <span class=\"nv\">$zr<\/span> <span class=\"o\">*<\/span> <span class=\"nv\">$zr<\/span><span class=\"p\">;<\/span>\r\n        <span class=\"nv\">$zi2<\/span> <span class=\"o\">=<\/span> <span class=\"nv\">$zi<\/span> <span class=\"o\">*<\/span> <span class=\"nv\">$zi<\/span><span class=\"p\">;<\/span>\r\n        <span class=\"nv\">$zr<\/span> <span class=\"o\">=<\/span> <span class=\"nv\">$zr2<\/span> <span class=\"o\">-<\/span> <span class=\"nv\">$zi2<\/span> <span class=\"o\">+<\/span> <span class=\"nv\">$cr<\/span><span class=\"p\">;<\/span>\r\n        <span class=\"nv\">$zi<\/span> <span class=\"o\">=<\/span> <span class=\"nv\">$temp<\/span> <span class=\"o\">+<\/span> <span class=\"nv\">$temp<\/span> <span class=\"o\">+<\/span> <span class=\"nv\">$ci<\/span><span class=\"p\">;<\/span>\r\n        <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"nv\">$zi2<\/span> <span class=\"o\">+<\/span> <span class=\"nv\">$zr2<\/span> <span class=\"o\">&gt;<\/span> <span class=\"no\">BAILOUT<\/span><span class=\"p\">)<\/span>\r\n            <span class=\"k\">return<\/span> <span class=\"nv\">$i<\/span><span class=\"p\">;<\/span>\r\n        <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"nv\">$i<\/span> <span class=\"o\">&gt;<\/span> <span class=\"no\">MAX_ITERATIONS<\/span><span class=\"p\">)<\/span>\r\n            <span class=\"k\">return<\/span> <span class=\"mi\">0<\/span><span class=\"p\">;<\/span>\r\n    <span class=\"p\">}<\/span>\r\n<span class=\"p\">}<\/span>\r\n<\/code><\/pre>\n<p>\u6267\u884c\u7ed3\u679c\u5982\u4e0b\u3002<\/p>\n<div>\n<div class=\"post-table\">\u74b0\u5883\u5b9f\u884c\u6642\u9593PHP7-JIT (JIT=on)0.011gcc -O2 (4.9.2)0.013LuaJIT-2.0.3 (JIT=on)0.014gcc -O0 (4.9.2)0.022HHVM-3.5.0 (JIT=on)0.030Java-1.8.0 (JIT=on)0.059LuaJIT-2.0.3 (JIT=off)0.073Java-1.8.0 (JIT=off)0.251PHP-70.281squirrel-3.0.40.335Lua-5.2.20.339PHP-5.60.379PHP-5.50.383PHP-5.40.406ruby-2.1.50.684PHP-5.30.855HHVM-3.5.0 (JIT=off)0.978PHP-5.21.096python-2.7.81.128PHP-5.11.217perl-5.18.42.083PHP-4.44.209PHP-5.04.434<br \/>\n\u867d\u7136\u7248\u672c\u4e0d\u660e\uff0c\u4f46\u539f\u751f\u7684PHP7\u901f\u5ea6\u8d85\u8fc7\u4e8620\u500d\uff0c\u6bd4HHVM\u5feb3\u500d\uff0c\u4e5f\u6bd4gcc\u548cLuaJIT\u5feb\uff0c\u8fd9\u786e\u5b9e\u8ba9\u4eba\u6000\u7591\u662f\u5426\u6709\u4ec0\u4e48\u9519\u8bef\u3002<\/p>\n<p>\u987a\u4fbf\u8bf4\u4e00\u53e5\uff0c\u8fd9\u4e2a\u957f\u6905\u662f4\u5e74\u524d\u7684\u3002<br \/>\n\u6839\u636eRFC\uff0c\u5728\u6ca1\u6709JIT\u7684PHP7.4\u4e2d\uff0c\u6267\u884c\u65f6\u95f4\u662f0.046\u79d2\u3002<br \/>\n\u73b0\u5728PHP7.4\u53ea\u97000.046\u79d2\uff0c\u800cPHP7\u9700\u89810.281\u79d2\uff0c\u6211\u89c9\u5f97\u5728\u8fd9\u4e2a\u65f6\u70b9\u5df2\u7ecf\u5f88\u5947\u602a\u4e86\u3002<br \/>\n\u8fd9\u53ea\u662f\u6267\u884c\u73af\u5883\u7684\u4e0d\u540c\u9020\u6210\u7684\u5417\uff1f<\/p>\n<p>\u6b64\u5916\uff0c\u6211\u8fd8\u6ce8\u610f\u5230\uff0c\u5982\u679c\u4ed4\u7ec6\u89c2\u5bdf\uff0c\u53ea\u6709PHP\u4f7f\u7528\u4e86ob_start\/ob_end_flush\u6765\u6291\u5236\u8f93\u51fa\uff0c\u8fd9\u8ba9\u6211\u611f\u5230\u6709\u70b9\u62c5\u5fe7\u3002\u867d\u7136\u8fd9\u5bf9PHP\u4e4b\u95f4\u7684\u6bd4\u8f83\u6ca1\u6709\u5f71\u54cd\uff0c\u4f46\u662f\u4e0e\u5176\u4ed6\u8bed\u8a00\u7684\u6bd4\u8f83\u53ef\u80fd\u4e0d\u516c\u5e73\u3002<\/p>\n<p>\u987a\u4fbf\u8bf4\u4e00\u4e0b\uff0c\u636e\u8bf4\u7528Go\u5e76\u884c\u5904\u7406\u53ea\u9700\u89810.002\u79d2\u3002\u54c7\u54e6\u3002<\/p>\n<details>JIT$Mandelbrot::iterate\uff1a\uff1b\uff08\/home\/dmitry\/php\/bench\/b.php\uff09<br \/>\nsub $0x10, %esp<br \/>\ncmp $0x1, 0x1c\uff08%esi\uff09<br \/>\njb .L14<br \/>\njmp .L1<br \/>\n.ENTRY1\uff1a<br \/>\nsub $0x10, %esp<br \/>\n.L1\uff1a<br \/>\ncmp $0x2, 0x1c\uff08%esi\uff09<br \/>\njb .L15<br \/>\nmov $0xec3800f0, %edi<br \/>\njmp .L2<br \/>\n.ENTRY2\uff1a<br \/>\nsub $0x10, %esp<br \/>\n.L2\uff1a<br \/>\ncmp $0x5, 0x48\uff08%esi\uff09<br \/>\njnz .L16<br \/>\nvmovsd 0x40\uff08%esi\uff09, %xmm1<br \/>\nvsubsd 0xec380068, %xmm1, %xmm1<br \/>\n.L3\uff1a<br \/>\nmov 0x30\uff08%esi\uff09, %eax<br \/>\nmov 0x34\uff08%esi\uff09, %edx<br \/>\nmov %eax, 0x60\uff08%esi\uff09<br \/>\nmov %edx, 0x64\uff08%esi\uff09<br \/>\nmov 0x38\uff08%esi\uff09, %edx<br \/>\nmov %edx, 0x68\uff08%esi\uff09<br \/>\ntest $0x1, %dh<br \/>\njz .L4<br \/>\nadd $0x1, \uff08%eax\uff09<br \/>\n.L4\uff1a<br \/>\nvxorps %xmm2, %xmm2, %xmm2<br \/>\nvxorps %xmm3, %xmm3, %xmm3<br \/>\nxor %edx, %edx<br \/>\n.L5\uff1a<br \/>\ncmp $0x0, EG\uff08vm_interrupt\uff09<br \/>\njnz .L18<br \/>\nadd $0x1, %edx<br \/>\nvmulsd %xmm3, %xmm2, %xmm4<br \/>\nvmulsd %xmm2, %xmm2, %xmm5<br \/>\nvmulsd %xmm3, %xmm3, %xmm6<br \/>\nvsubsd %xmm6, %xmm5, %xmm7<br \/>\nvaddsd %xmm7, %xmm1, %xmm2<br \/>\nvaddsd %xmm4, %xmm4, %xmm4<br \/>\ncmp $0x5, 0x68\uff08%esi\uff09<br \/>\njnz .L19<br \/>\nvaddsd 0x60\uff08%esi\uff09, %xmm4, %xmm3<br \/>\n.L6\uff1a<br \/>\nvaddsd %xmm5, %xmm6, %xmm6<br \/>\nvucomisd 0xec3800a8, %xmm6<br \/>\njp .L13<br \/>\njbe .L13<br \/>\nmov 0x8\uff08%esi\uff09, %ecx<br \/>\ntest %ecx, %ecx<br \/>\njz .L7<br \/>\nmov %edx, \uff08%ecx\uff09<br \/>\nmov $0x4, 0x8\uff08%ecx\uff09<br \/>\n.L7\uff1a<br \/>\ntest $0x1, 0x39\uff08%esi\uff09<br \/>\njnz .L21<br \/>\n.L8\uff1a<br \/>\ntest $0x1, 0x49\uff08%esi\uff09<br \/>\njnz .L23<br \/>\n.L9\uff1a<br \/>\ntest $0x1, 0x69\uff08%esi\uff09<br \/>\njnz .L25<br \/>\n.L10\uff1a<br \/>\nmovzx 0x1a\uff08%esi\uff09, %ecx<br \/>\ntest $0x496, %ecx<br \/>\njnz JIT$$leave_function<br \/>\nmov 0x20\uff08%esi\uff09, %eax<br \/>\nmov %eax, EG\uff08current_execute_data\uff09<br \/>\ntest $0x40, %ecx<br \/>\njz .L12<br \/>\nmov 0x10\uff08%esi\uff09, %eax<br \/>\nsub $0x1, \uff08%eax\uff09<br \/>\njnz .L11<br \/>\nmov %eax, %ecx<br \/>\ncall zend_objects_store_del<br \/>\njmp .L12<br \/>\n.L11\uff1a<br \/>\nmov 0x4\uff08%eax\uff09, %ecx<br \/>\nand $0xfffffc10, %ecx<br \/>\ncmp $0x10, %ecx<br \/>\njnz .L12<br \/>\nmov %eax, %ecx<br \/>\ncall gc_possible_root<br \/>\n.L12\uff1a<br \/>\nmov %esi, EG\uff08vm_stack_top\uff09<br \/>\nmov 0x20\uff08%esi\uff09, %esi<br \/>\ncmp $0x0, EG\uff08exception\uff09<br \/>\nmov \uff08%esi\uff09, %edi<br \/>\njnz JIT$$leave_throw<br \/>\nadd $0x1c, %edi<br \/>\nadd $0x10, %esp<br \/>\njmp \uff08%edi\uff09<br \/>\n.L13\uff1a<br \/>\ncmp $0x3e8, %edx<br \/>\njle .L5<br \/>\nmov 0x8\uff08%esi\uff09, %ecx<br \/>\ntest %ecx, %ecx<br \/>\njz .L7<br \/>\nmov $0x0, \uff08%ecx\uff09<br \/>\nmov $0x4, 0x8\uff08%ecx\uff09<br \/>\njmp .L7<br \/>\n.L14\uff1a<br \/>\nmov %edi, \uff08%esi\uff09<br \/>\nmov %esi, %ecx<br \/>\ncall zend_missing_arg_error<br \/>\njmp JIT$$exception_handler<br \/>\n.L15\uff1a<br \/>\nmov %edi, \uff08%esi\uff09<br \/>\nmov %esi, %ecx<br \/>\ncall zend_missing_arg_error<br \/>\njmp JIT$$exception_handler<br \/>\n.L16\uff1a<br \/>\ncmp $0x4, 0x48\uff08%esi\uff09<br \/>\njnz .L17<br \/>\nvcvtsi2sd 0x40\uff08%esi\uff09, %xmm1, %xmm1<br \/>\nvsubsd 0xec380068, %xmm1, %xmm1<br \/>\njmp .L3<br \/>\n.L17\uff1a<br \/>\nmov %edi, \uff08%esi\uff09<br \/>\nlea 0x50\uff08%esi\uff09, %ecx<br \/>\nlea 0x40\uff08%esi\uff09, %edx<br \/>\nsub $0xc, %esp<br \/>\npush $0xec380068<br \/>\ncall sub_function<br \/>\nadd $0xc, %esp<br \/>\ncmp $0x0, EG\uff08exception\uff09<br \/>\njnz JIT$$exception_handler<br \/>\nvmovsd 0x50\uff08%esi\uff09, %xmm1<br \/>\njmp .L3<br \/>\n.L18\uff1a<br \/>\nmov $0xec38017c, %edi<br \/>\njmp JIT$$interrupt_handler<br \/>\n.L19\uff1a<br \/>\ncmp $0x4, 0x68\uff08%esi\uff09<br \/>\njnz .L20<br \/>\nvcvtsi2sd 0x60\uff08%esi\uff09, %xmm3, %xmm3<br \/>\nvaddsd %xmm4, %xmm3, %xmm3<br \/>\njmp .L6<br \/>\n.L20\uff1a<br \/>\nmov $0xec380240, \uff08%esi\uff09<br \/>\nlea 0x80\uff08%esi\uff09, %ecx<br \/>\nvmovsd %xmm4, 0xe0\uff08%esi\uff09<br \/>\nmov $0x5, 0xe8\uff08%esi\uff09<br \/>\nlea 0xe0\uff08%esi\uff09, %edx<br \/>\nsub $0xc, %esp<br \/>\nlea 0x60\uff08%esi\uff09, %eax<br \/>\npush %eax<br \/>\ncall add_function<br \/>\nadd $0xc, %esp<br \/>\ncmp $0x0, EG\uff08exception\uff09<br \/>\njnz JIT$$exception_handler<br \/>\nvmovsd 0x80\uff08%esi\uff09, %xmm3<br \/>\njmp .L6<br \/>\n.L21\uff1a<br \/>\nmov 0x30\uff08%esi\uff09, %ecx<br \/>\nsub $0x1, \uff08%ecx\uff09<br \/>\njnz .L22<br \/>\nmov $0x1, 0x38\uff08%esi\uff09<br \/>\nmov $0xec3802b0, \uff08%esi\uff09<br \/>\ncall rc_dtor_func<br \/>\njmp .L8<br \/>\n.L22\uff1a<br \/>\nmov 0x4\uff08%ecx\uff09, %eax<br \/>\nand $0xfffffc10, %eax<br \/>\ncmp $0x10, %eax<br \/>\njnz .L8<br \/>\ncall gc_possible_root<br \/>\njmp .L8<br \/>\n.L23\uff1a<br \/>\nmov 0x40\uff08%esi\uff09, %ecx<br \/>\nsub $0x1, \uff08%ecx\uff09<br \/>\njnz .L24<br \/>\nmov $0x1, 0x48\uff08%esi\uff09<br \/>\nmov $0xec3802b0, \uff08%esi\uff09<br \/>\ncall rc_dtor_func<br \/>\njmp .L9<br \/>\n.L24\uff1a<br \/>\nmov 0x4\uff08%ecx\uff09, %eax<br \/>\nand $0xfffffc10, %eax<br \/>\ncmp $0x10, %eax<br \/>\njnz .L9<br \/>\ncall gc_possible_root<br \/>\njmp .L9<br \/>\n.L25\uff1a<br \/>\nmov 0x60\uff08%esi\uff09, %ecx<br \/>\nsub $0x1, \uff08%ecx\uff09<br \/>\njnz .L26<br \/>\nmov $0x1, 0x68\uff08%esi\uff09<br \/>\nmov $0xec3802b0, \uff08%esi\uff09<br \/>\ncall rc_dtor_func<br \/>\njmp .L10<br \/>\n.L26\uff1a<br \/>\nmov 0x4\uff08%ecx\uff09, %eax<br \/>\nand $0xfffffc10, %eax<br \/>\ncmp $0x10, %eax<br \/>\njnz .L10<br \/>\ncall gc_possible_root<br \/>\njmp .L10<\/details>\n<h2>\u540e\u5411\u517c\u5bb9\u6027\u6ca1\u6709\u7834\u574f\u4e92\u6362\u6027\u7684\u53d8\u66f4\u3002<\/p>\n<h2>\u5176\u4ed6\u5f71\u54cd<\/p>\n<h3>\u6d4f\u89c8\u5668\u63d2\u4ef6\u50cf Xdebug\u3001XHProf\u3001Blackfire\u3001Tideways \u8fd9\u6837\u7684\u8c03\u8bd5\u5668\u548c\u6027\u80fd\u5206\u6790\u5de5\u5177\u4f1a\u53d7\u5230\u5f71\u54cd\u3002<\/p>\n<h3>Opcache (OP\u4ee3\u7801\u7f13\u5b58)\u5373\u65f6\u7f16\u8bd1\uff08Just-In-Time Compilation\uff09\u4f5c\u4e3aOpcache\u7684\u4e00\u9879\u529f\u80fd\u88ab\u5b9e\u73b0\u3002<\/p>\n<h3>\u8ffd\u52a0\u7684\u5e38\u6570\u6ca1\u6709\u989d\u5916\u7684\u5e38\u6570\u88ab\u6dfb\u52a0\u3002<\/p>\n<h3>\u8c03\u8bd5\u8c03\u8bd5JIT\u771f\u7684\u5f88\u56f0\u96be\u554a\uff01\u52a0\u6cb9\u5427\uff01<\/p>\n<h2>PHP\u914d\u7f6e\u6587\u4ef6php.ini\u4f1a\u88ab\u6dfb\u52a0\u591a\u4e2a\u9879\u76ee\u3002<\/p>\n<h3>opcache.jit_buffer_size (PHP opcode cache&#8217;s Just-in-Time compilation buffer size) \u53ef\u4ee5\u8fdb\u884c\u6539\u5199\u4e3a\uff1aopcache.jit_buffer_size\uff08PHP\u7684opcode\u7f13\u5b58\u7684\u5373\u65f6\u7f16\u8bd1\u7f13\u51b2\u5927\u5c0f\uff09\u3002\u4e3a\u672c\u5730\u4ee3\u7801\u4fdd\u7559\u7684\u5185\u5b58\u5927\u5c0f\uff0c\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\uff0c\u5bf9\u5e94K\u548cM\u7684\u8868\u793a\u3002<br \/>\n\u9ed8\u8ba4\u4e3a0\uff0c\u8868\u793a\u7981\u7528JIT\u3002<\/p>\n<h3>opcache.jit:<br \/>\nOPcache\u5373\u65f6\u7f16\u8bd1JIT\u7684\u63a7\u5236\u9009\u9879\uff0c\u6309\u987a\u5e8f\u8868\u793a\u4e3aCRTO\uff0c \u9ed8\u8ba4\u8bbe\u7f6e\u4e3a&#8221;1205&#8243;\u3002\u4e5f\u8bb8\u66f4\u6539\u4e3a&#8221;1235&#8243;\u53ef\u80fd\u4f1a\u66f4\u597d\u3002<\/p>\n<h4>\u8bf7\u7528\u4e2d\u6587\u5c06\u4ee5\u4e0b\u5185\u5bb9\u8868\u8fbe\uff0c\u53ea\u9700\u8981\u4e00\u4e2a\u9009\u9879\uff1aC<\/p>\n<p>CPU\u4f18\u5316\u7ea7\u522b\uff0c\u8303\u56f4\u4e3a0-1\u3002<br \/>\n0\u8868\u793a\u4e0d\u4f7f\u7528\uff0c1\u8868\u793a\u542f\u7528AVX\u6307\u4ee4\u96c6\u3002<\/p>\n<h4>\u4ee5\u4e0b\u662f\u539f\u6587\u7684\u4e2d\u6587\u91ca\u4e49\uff1aR<\/p>\n<p>\u5bc4\u5b58\u5668\u5206\u914d\uff0c\u8303\u56f4\u4ece0\u52302\u3002<br \/>\n0\u4ee3\u8868\u4e0d\u4f7f\u7528\u5bc4\u5b58\u5668\u5206\u914d\uff0c1\u4ee3\u8868\u5c40\u90e8\u5bc4\u5b58\u5668\u5206\u914d\uff0c2\u4ee3\u8868\u5168\u5c40\u5bc4\u5b58\u5668\u5206\u914d\u3002<\/p>\n<h4>\u8bf7\u7528\u4e2d\u6587\u66f4\u52a0\u672c\u5730\u5316\u5730\u7ffb\u8bd1\u4ee5\u4e0b\u5185\u5bb9\uff0c\u53ea\u9700\u8981\u4e00\u79cd\u9009\u9879\uff1aT<\/p>\n<p>JIT\u7684\u542f\u52a8\u65f6\u673a\u548c\u8303\u56f4\u662f0-5\u3002<br \/>\n0\u8868\u793a\u5728\u6700\u521d\u811a\u672c\u542f\u52a8\u65f6\u542f\u7528\u6240\u6709\u529f\u80fd\u3002<br \/>\n1\u8868\u793a\u5728\u6700\u521d\u5904\u7406\u6267\u884c\u65f6\u542f\u7528JIT\u3002<br \/>\n2\u8868\u793a\u5728\u7b2c\u4e00\u4e2a\u8bf7\u6c42\u4e2d\u8fdb\u884c\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u5728\u7b2c\u4e8c\u4e2a\u8bf7\u6c42\u4e2d\u8fdb\u884c\u7f16\u8bd1\u3002<br \/>\n3\u8868\u793a\u5373\u65f6\u8fdb\u884c\u914d\u7f6e\u6587\u4ef6\u548c\u7f16\u8bd1\u3002<br \/>\n4\u8868\u793a\u7f16\u8bd1\u5e26\u6709&#8221;@jit&#8221;\u6ce8\u91ca\u7684\u51fd\u6570\u3002<\/p>\n<h4>\u53ea\u9700\u8981\u4e00\u79cd\u9009\u9879\uff0c\u5c06\u4ee5\u4e0b\u5185\u5bb9\u4ee5\u4e2d\u6587\u8fdb\u884c\u7ffb\u8bd1\uff1aO<br \/>\n\u53ea\u9700\u8981\u4e00\u79cd\u9009\u62e9\u3002<\/p>\n<p>\u6700\u4f73\u5316\u7ea7\u522b\uff0c\u8303\u56f4\u662f0-5\u3002<br \/>\n0\u8868\u793a\u4e0d\u4f7f\u7528\u5373\u65f6\u7f16\u8bd1\uff08JIT\uff09\uff0c5\u8868\u793a\u8fdb\u884c\u6700\u9ad8\u7ea7\u522b\u7684\u4f18\u5316\u3002<\/p>\n<h3>\u7f13\u5b58\u52a0\u901f\u5668.jit_debug\u5373\u65f6\u7f16\u8bd1\u8c03\u8bd5\u63a7\u5236\u9009\u9879\u3002<br \/>\n\u9ed8\u8ba4\u4e3a0\u3002<br \/>\n\u636e\u8bf4\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u4f4d\u6765\u8f93\u51fa\u5404\u79cd\u8c03\u8bd5\u4fe1\u606f\uff0c\u4f46\u5177\u4f53\u662f\u4ec0\u4e48\u6211\u4e0d\u592a\u6e05\u695a\u3002<br \/>\n\u4f3c\u4e4e\u53ef\u4ee5\u8f93\u51faSSA\u8868\u8fbe\u5f0f\u5f62\u5f0f\uff0cperf.map\u4ee5\u53ca\u5373\u65f6\u7f16\u8bd1\u540e\u7684\u4ee3\u7801\u3002<\/p>\n<h2>\u8868\u6f14bench.php\u7684\u6267\u884c\u65f6\u95f4\u4ece0.320\u79d2\u51cf\u5c11\u52300.140\u79d2\u3002<br \/>\n\u5bf9\u4e8e\u4f7f\u7528CPU\u8f83\u591a\u7684\u5904\u7406\uff0c\u53ef\u4ee5\u9884\u671f\u5230\u620f\u5267\u6027\u7684\u52a0\u901f\u3002<br \/>\n\u6b64\u5916\uff0c\u6839\u636eNikita\u7684\u8bf4\u6cd5\uff0cPHP-Parser\u7684\u901f\u5ea6\u63d0\u9ad8\u4e861.3\u500d\u3002<\/p>\n<p>\u7136\u800c\uff0c\u50cfWordPress\u8fd9\u6837\u7684Web\u5e94\u7528\u7a0b\u5e8f\u5e76\u4e0d\u80fd\u671f\u671b\u83b7\u5f97\u592a\u591a\u597d\u5904\u3002<br \/>\n\u4f3c\u4e4e\u53ea\u63d0\u9ad8\u4e86\u4ece315req\/\u79d2\u5230326req\/\u79d2\u7684\u7a0b\u5ea6\u3002<br \/>\n\u5bf9\u4e8e\u8fd9\u79cd\u73b0\u5b9e\u5e94\u7528\u7a0b\u5e8f\uff0c\u6211\u4eec\u8ba1\u5212\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u6539\u8fdb\uff0c\u4ee5\u63d0\u9ad8\u901f\u5ea6\u3002<\/p>\n<h2>\u672a\u6765\u7684\u524d\u666f\u8ba1\u5212\u901a\u8fc7\u751f\u6210\u7ecf\u8fc7\u4f18\u5316\u7684\u4ee3\u7801\u6765\u6539\u8fdbJIT\uff0c\u8fd9\u662f\u5728\u51fd\u6570\u7684\u5206\u6790\u4e4b\u540e\u8fdb\u884c\u7684\u3002<br \/>\n\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u66f4\u6df1\u5165\u5730\u4e0e\u9884\u52a0\u8f7d\u548cFFI\u8fdb\u884c\u6574\u5408\u3002<br \/>\n\u8fd8\u53ef\u4ee5\u671f\u671b\u6807\u51c6\u5316\u5728PHP\u4e2d\u63d0\u4f9b\u7528\u4e8e\u7f16\u5199\u5185\u5efa\u51fd\u6570\u800c\u975eC\u7684\u65b9\u6cd5\u3002<\/p>\n<h2>\u6295\u7968 &#8211; (vote)<br \/>\n2019\u5e743\u670821\u65e5\u5f00\u59cb\u6295\u7968\uff0c2019\u5e743\u670828\u65e5\u6295\u7968\u7ed3\u675f\u3002<br \/>\n\u8981\u901a\u8fc7\u51b3\u8bae\uff0c\u9700\u8981\u6295\u7968\u8005\u4e2d\u6709\u4e09\u5206\u4e4b\u4e8c\u52a0\u4e00\u7684\u8d5e\u6210\u7968\u3002<\/p>\n<h2>PHP7.4\u6211\u6ca1\u80fd\u8fdb\u5165PHP7.4\u3002<br \/>\n\u867d\u7136\u6211\u5df2\u7ecf\u521b\u5efa\u4e86\u5206\u652f\uff0c\u4f46\u662f\u5bf9\u4e8e\u5f15\u5165\u52307.4\u7248\u672c\uff0c\u8d5e\u6210\u7684\u53ea\u670918\u4eba\uff0c\u53cd\u5bf9\u7684\u670934\u4eba\uff0c\u6240\u4ee5\u88ab\u5426\u51b3\u4e86\u3002<br \/>\n\u56e0\u4e3a7.4\u672c\u5c31\u662f\u529f\u80fd\u7e41\u591a\u7684\u65b0\u7248\u672c\uff0c\u6240\u4ee5\u975e\u5e38\u56f0\u96be\u3002<br \/>\n\u518d\u52a0\u4e0a\u6dfb\u52a05\u4e07\u884c\u4ee3\u7801\u4e4b\u7c7b\u7684\u4efb\u52a1\uff0c\u786e\u5b9e\u592a\u4e25\u5cfb\u4e86\u3002<\/p>\n<h2>\u8fd9\u662f\u4e00\u4e2a\u5916\u90e8\u8fde\u63a5\u3002<\/p>\n<h3>\u8bf7\u4ee5\u4e2d\u6587\u539f\u751f\u8bed\u8a00\u89e3\u91ca\u4ee5\u4e0b\u5185\u5bb9\uff0c\u4ec5\u9700\u8981\u4e00\u4e2a\u7248\u672c\uff1a\u62c9\u53d6\u8bf7\u6c42 \/ \u5373\u65f6\u7f16\u8bd1\u5206\u652f<\/p>\n<p>\u8fd9\u4e2a\u63d0\u4ea4\u6709900\u4e2a\u63d0\u4ea4\uff0c\u5e76\u4e14\u6dfb\u52a0\u4e86\u8d85\u8fc75\u4e07\u884c\u4ee3\u7801\uff0c\u662f\u4e00\u4e2a\u975e\u5e38\u5e9e\u5927\u7684\u62c9\u53d6\u8bf7\u6c42\u3002<br \/>\n\u6211\u7edd\u5bf9\u4e0d\u60f3\u81ea\u5df1\u505a\u8fd9\u6837\u7684\u5408\u5e76\u5de5\u4f5c\u3002<\/p>\n<h3>PHP 7.4\u5206\u652f\u4e0d\u592a\u53ef\u80fd\u4f1a\u4f7f\u7528PHP7.4\u7684JIT\u5206\u652f\u3002<\/p>\n<h3>DynASM \/ \u975e\u5b98\u65b9DynASM\u6587\u4ef6.\u8fd9\u662f\u4e00\u4e2a\u7528\u4e8eJIT\u7684\u5e93\u3002<\/p>\n<h3>\u3010RFC\u3011 \u3010VOTE\u3011\u5373\u65f6\u7f16\u8bd1\u5927\u5bb6\u7684\u611f\u89c9\u662f\u201c7.4\u662f\u4e0d\u53ef\u80fd\u7684\uff0c\u5e94\u8be5\u53ea\u9009\u62e98\u201d\u3002<br \/>\n\u867d\u7136\u8fd9\u6b21\u6539\u4fee\u89c4\u6a21\u5982\u6b64\u4e4b\u5927\uff0c\u4f46\u5e16\u5b50\u7684\u56de\u590d\u5e76\u6ca1\u6709\u60f3\u8c61\u4e2d\u7684\u591a\uff0c\u8fd9\u662f\u5426\u610f\u5473\u7740\u9664\u4e86\u76ee\u6807\u7248\u672c\u4e4b\u5916\u5df2\u7ecf\u65e0\u8bdd\u53ef\u8bf4\u4e86\uff0c\u5982\u540c\u4e8b\u5148\u548c\u9884\u671f\u4e00\u6837\uff1f<\/p>\n<h1>\u5370\u8c61\u53ea\u8981\u662f\u6b63\u5e38\u5236\u4f5cWeb\u5e94\u7528\u7a0b\u5e8f\uff0c\u4f3c\u4e4e\u6ca1\u6709\u4ec0\u4e48\u5f71\u54cd\u3002<br \/>\nJIT\u771f\u6b63\u53d1\u6325\u4f5c\u7528\u7684\u5730\u65b9\u662f\u5728\u540e\u53f0\u6279\u5904\u7406\u7b49\u540e\u7aef\u5904\u7406\u65b9\u9762\u3002<\/p>\n<p>\u4ee5\u524d\u6211\u4eec\u4f1a\u8ba4\u4e3a\u7528PHP\u8fdb\u884c\u6279\u5904\u7406\u662f\u201c\u75af\u4e86\u5417\uff01\uff1f\u201d\u7684\u5370\u8c61\uff0c\u4f46\u672a\u6765PHP\u4f3c\u4e4e\u6bd4\u7528\u5176\u4ed6\u8bed\u8a00\u7f16\u5199\u66f4\u5feb\u3002<\/p>\n<p>\u8fd8\u6709\uff0c\u7531\u4e8e\u5bf9opcache\u548cJIT\u7684\u7406\u89e3\u6709\u4e9b\u6a21\u7cca\uff0c\u6240\u4ee5\u53ef\u80fd\u5b58\u5728\u8bb8\u591a\u9519\u8bef\u3002\u6211\u76f8\u4fe1\u4e00\u5b9a\u4f1a\u6709\u4eba\u63d0\u51fapull request\u6765\u5e2e\u5fd9\u6539\u6b63\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2020\/06\/26\u9644\u8a00\uff1a\u7531\u4e8eAlpha\u7248\u5df2\u53d1\u5e03\uff0c\u6211\u5c1d\u8bd5\u4e86\u5b9e\u9645\u4f7f\u7528\u3002 JIT\u7684RFC\u4e8e2019\u5e743\u670821\u65e5\u5f00\u59cb [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-30541","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u3010php8-0\u3011php-\u5c06\u652f\u6301-jit-\u7f16\u8bd1\u6280\u672f\u3002-2\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u3010php8-0\u3011php-\u5c06\u652f\u6301-jit-\u7f16\u8bd1\u6280\u672f\u3002-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-15T09:46:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-12T11:40:00+00:00\" \/>\n<meta name=\"author\" content=\"\u5b87, \u534e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5b87, \u534e\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/\",\"name\":\"\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-02-15T09:46:50+00:00\",\"dateModified\":\"2025-08-12T11:40:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\"},\"description\":\"\u5173\u4e8e\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\",\"name\":\"\u5b87, \u534e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"caption\":\"\u5b87, \u534e\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f - Blog - Silicon Cloud","description":"\u5173\u4e8e\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u3010php8-0\u3011php-\u5c06\u652f\u6301-jit-\u7f16\u8bd1\u6280\u672f\u3002-2\/","og_locale":"zh_CN","og_type":"article","og_title":"\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f","og_description":"\u5173\u4e8e\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u3010php8-0\u3011php-\u5c06\u652f\u6301-jit-\u7f16\u8bd1\u6280\u672f\u3002-2\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-02-15T09:46:50+00:00","article_modified_time":"2025-08-12T11:40:00+00:00","author":"\u5b87, \u534e","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u5b87, \u534e","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/","name":"\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-02-15T09:46:50+00:00","dateModified":"2025-08-12T11:40:00+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458"},"description":"\u5173\u4e8e\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010PHP8.0\u3011PHP \u5c06\u652f\u6301 JIT \u7f16\u8bd1\u6280\u672f"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458","name":"\u5b87, \u534e","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","caption":"\u5b87, \u534e"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php8-0%e3%80%91php-%e5%b0%86%e6%94%af%e6%8c%81-jit-%e7%bc%96%e8%af%91%e6%8a%80%e6%9c%af%e3%80%82-2\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30541","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=30541"}],"version-history":[{"count":3,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30541\/revisions"}],"predecessor-version":[{"id":111762,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30541\/revisions\/111762"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=30541"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=30541"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=30541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}