{"id":192,"date":"2014-08-25T17:42:56","date_gmt":"2014-08-25T09:42:56","guid":{"rendered":"http:\/\/www.codeeel.com\/?p=192"},"modified":"2014-08-25T17:42:56","modified_gmt":"2014-08-25T09:42:56","slug":"hhvm%e7%ae%80%e4%bb%8b","status":"publish","type":"post","link":"https:\/\/www.codeeel.com\/?p=192","title":{"rendered":"HHVM\u7b80\u4ecb"},"content":{"rendered":"<p>HHVM (HipHop Virtual Machine)\u4f1a\u5c06PHP\u4ee3\u7801\u8f6c\u6362\u6210\u9ad8\u7ea7\u522b\u7684\u5b57\u8282\u7801\uff08\u901a\u5e38\u79f0\u4e3a\u4e2d\u95f4\u8bed\u8a00\uff09\u3002\u7136\u540e\u5728\u8fd0\u884c\u65f6\u901a\u8fc7\u5373\u65f6\uff08JIT\uff09\u7f16\u8bd1\u5668\u5c06\u8fd9\u4e9b\u5b57\u8282\u7801\u8f6c\u6362\u4e3ax64\u7684\u673a\u5668\u7801\u3002\u5728\u8fd9\u4e9b\u65b9\u9762\uff0cHHVM\u5341\u5206\u7c7b\u4f3c\u4e0eC#\u7684CLR\u548cJava\u7684JVM\u3002<\/p>\n<p>\u5386\u53f2<\/p>\n<p>\u65e9\u57282008\u5e74Facebook\u5c31\u5f00\u59cb\u4f7f\u7528HipHop\uff08\u73b0\u5728\u6210\u4e3aHPHP\uff09\uff0c\u8fd9\u662f\u4e00\u79cdPHP\u6267\u884c\u5f15\u64ce\uff1b\u6700\u521d\u662f\u4e3a\u4e86\u5c06Fackbook\u7684\u5927\u91cfPHP\u4ee3\u7801\u8f6c\u6210C++\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u548c\u8282\u7ea6\u8d44\u6e90\u3002\u6700\u521d\u7684\u7248\u672c\u6210\u4e3aHPHPc\uff0c\u662f\u4e00\u4e2aPHP\u5230C++\u7684\u7f16\u8bd1\u5668\u3002<\/p>\n<p>\u4e4b\u540e\u7684\u4e24\u5e74\u91cc\uff0cFackbook\u53c8\u5411HipHop\u4e2d\u589e\u52a0\u4e86HPHPi\u548cHPHPd\uff0cHPHPi\u5176\u5b9e\u5c31\u662f\u5f00\u53d1\u7248\u7684HPHP\uff0cHPHPd\u5219\u662fHipHop\u7684\u8c03\u8bd5\u5668\u3002\u901a\u8fc7HPHPd\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u5355\u6b65\u8c03\u8bd5\u8fd0\u884c\u5728HipHop\u5e73\u53f0\u4e0a\u7684PHP\u4ee3\u7801\u3002<\/p>\n<p>\u4f7f\u7528HipHop\u7684PHP\u4ee3\u7801\u5728\u6027\u80fd\u4e0a\u6700\u5927\u53ef\u4ee5\u662f\u539f\u751f\u76846\u500d\u3002\u4f46\u662f\uff0c\u7b2c\u4e00\u7248\u7684HipHop\u6709\u4e0d\u5c11\u786e\u5b9a\uff0c\u5177\u4f53\u5982\u4e0b\uff1a<\/p>\n<p>HPHPc \u65e0\u6cd5\u5b8c\u5168\u652f\u6301PHP\u7684\u6240\u6709\u7279\u6027\uff0c\u6700\u5178\u578b\u7684\u662f\u65e0\u6cd5\u652f\u6301create_function()\u548ceval()\u4e24\u4e2a\u51fd\u6570\u3002\u4f46\u8001\u5b9e\u8bf4\uff0c\u4e0d\u652f\u6301\u540e\u4e00\u4e2a\u51fd\u6570\u6211\u4e0d\u89c9\u5f97\u662f\u4ef6\u574f\u4e8b\u3002<br \/>\nFacebook\u7684\u5f00\u53d1\u8005\u4e0d\u5f97\u4e0d\u7ef4\u62a4\u4e24\u79cd\u4e0d\u540c\u7684\u5f15\u64ce\uff08HPHPc\u548cHPHPi\uff09\uff0c\u8fd9\u76f4\u63a5\u5bfc\u81f4\u4e86\u91cd\u590d\u52b3\u52a8\u548c\u8d44\u6e90\u6d6a\u8d39\u3002<br \/>\n\u6700\u540e\uff0cHPHPc\u90e8\u7f72\u6b65\u9aa4\u7e41\u6742\uff0c\u8fd9\u70b9\u5f88\u8ba9PHP\u5f00\u53d1\u8005\u5934\u75bc\u3002.<br \/>\n\u57282010\u5e74\u521d\uff0cFackbook\u56e0\u4e3a\u8fd9\u4e9b\u95ee\u9898\u505a\u51fa\u4e862\u4e2a\u91cd\u5927\u7684\u51b3\u5b9a\u3002\u9996\u5148\u662f\u5c06HipHop\u5e73\u53f0\u5f00\u6e90\uff0c\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\u6765\u52a0\u5febHipHop\u7684\u53d1\u5c55\u3002<br \/>\n\u5176\u6b21\uff0cFacebook\u5f00\u59cb\u5f00\u53d1HipHop\u7684\u66f4\u9ad8\u7248\u672c\uff0c\u4e5f\u5c31\u662fHHVM\uff08HipHop\u865a\u62df\u673a\uff09\uff0cHHVM\u52a0\u5f3a\u4e86HPHPc\u7684\u5065\u58ee\u6027\uff0c\u540c\u65f6\u8fd8\u4fee\u590d\u4e86\u8bb8\u591a\u91cd\u8981\u9519\u8bef\u3002<\/p>\n<p>HHVM\u662f\u5728HPHPc\u7684\u57fa\u7840\u4e0a\u6784\u5efa\uff0c\u5b83\u4f1a\u5c06PHP\u4ee3\u7801\u8f6c\u6362\u6210\u9ad8\u7ea7\u522b\u7684\u5b57\u8282\u7801\uff08\u4e00\u79cd\u4e2d\u95f4\u8bed\u8a00\uff09\uff0c\u5728\u8fd0\u884c\u65f6\u5373\u65f6\uff08JIT\uff09\u7f16\u8bd1\u5668\u4f1a\u5c06\u8fd9\u4e9b\u5b57\u8282\u7801\u7ffb\u8bd1\u6210\u673a\u5668\u7801\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u4e00\u4e9b\u5173\u4e8e\u5b57\u8282\u7801\u3001\u673a\u5668\u7801\u548c\u5373\u65f6\uff08JIT\uff09\u7f16\u8bd1\u5668\u7684\u6982\u5ff5\uff0c\u5feb\u901f\u7684\u6d4f\u89c8\u4ee5\u4e0b\u6982\u5ff5\uff0c\u53ef\u4ee5\u6e05\u695a\u8fd9\u4e9b\u6982\u5ff5\u5728HHVM\u6240\u5904\u7684\u89d2\u8272\u3002<\/p>\n<p>\u5b57\u8282\u7801\uff1a\u662f\u4e00\u79cd\u4eba\u7c7b\u65e0\u6cd5\u9605\u8bfb\u7684\u4ee3\u7801\uff0c\u4e13\u95e8\u7528\u6765\u7ed9\u7f16\u8bd1\u5668\u9ad8\u6548\u6267\u884c\u7684\u3002\u5f53HHVM\u9996\u6b21\u52a0\u8f7d\u9879\u76ee\u65f6\uff0c\u5b83\u4f1a\u5c06\u6240\u6709\u7684PHP\u4ee3\u7801\u8f6c\u6362\u6210\u5b57\u8282\u7801\uff1b\u5b57\u8282\u7801\u7684\u751f\u6210\u662f\u4e0e\u5e73\u53f0\u65e0\u5173\u7684\u3002<br \/>\n\u673a\u5668\u7801\uff1a\u662f\u4e00\u7cfb\u5217\u4f9bCPU\u6267\u884c\u7684\u6307\u4ee4\u3002\u7528\u8fc7\u6c47\u7f16\u7684\u90fd\u5e94\u8be5\u6e05\u695a\u673a\u5668\u7801\uff0c\u4f30\u8ba1\u6ca1\u4eba\u559c\u6b22\u7528\u6c47\u7f16\u7f16\u7a0b\u3002\u901a\u8fc7\u7f16\u8bd1\u5668\u5c31\u53ef\u4ee5\u628a\u6c47\u7f16\u8f6c\u6210\u673a\u5668\u7801\uff0c\u7136\u540e\u4f9bCPU\u5904\u7406\u3002<br \/>\nJIT\uff08\u5373\u65f6\uff09\u7f16\u8bd1\u5668\uff1a\u5373\u65f6\u7f16\u8bd1\u662f\u79cd\u8f6f\u4ef6\u4f18\u5316\u6280\u672f\uff0c\u6307\u5728\u8fd0\u884c\u65f6\u624d\u4f1a\u53bb\u7f16\u8bd1\u5b57\u8282\u7801\u3002\u5b57\u8282\u7801\u4f1a\u5b58\u653e\u5728\u5185\u5b58\u4e2d\uff0c\u7136\u540eJIT\u7f16\u8bd1\u5668\u4f1a\u6839\u636e\u9700\u8981\u52a0\u8f7d\u5e76\u7f16\u8bd1\u6240\u6d89\u7684\u5b57\u8282\u7801\u3002<\/p>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6280\u672f\uff0cHipHop\u548cHHVM\u83b7\u5f97\u4e86\u6027\u80fd\u7684\u63d0\u5347\u3002<\/p>\n<p>\u6700\u8fd1\uff0cHHVM\u51e0\u4e4e\u5df2\u7ecf\u5b8c\u5168\u652f\u6301PHP 5.4\u4e86\uff0c\u4f46\u8fd8\u662f\u6709\u4e0d\u5c11bug\uff0c\u6240\u4ee5\u4e0d\u662f\u6240\u6709\u5e94\u7528\u7a0b\u5e8f\u90fd\u53ef\u4ee5\u8fd0\u884c\u3002\u56e0\u6b64\uff0cFacebook\u51c6\u5907\u8ba9\u6700\u6d41\u884c\u768420\u4e2a\u5f00\u6e90PHP\u9879\u76ee\u80fd\u591f\u8fd0\u884c\u5728HHVM\u4e0a\u3002\u7b2c\u4e00\u4e2a\u5df2\u7ecf\u652f\u6301\u7684\u9879\u76ee\u5c31\u662fWordpress\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>HHVM (HipHop Virtual Machine)\u4f1a\u5c06PHP\u4ee3\u7801\u8f6c\u6362\u6210\u9ad8\u7ea7\u522b\u7684\u5b57\u8282\u7801\uff08\u901a\u5e38\u79f0\u4e3a\u4e2d\u95f4\u8bed\u8a00\uff09\u3002\u7136\u540e\u5728\u8fd0\u884c\u65f6\u901a\u8fc7\u5373\u65f6\uff08JIT\uff09\u7f16\u8bd1\u5668\u5c06\u8fd9\u4e9b\u5b57\u8282\u7801\u8f6c\u6362\u4e3ax64\u7684\u673a\u5668\u7801\u3002\u5728\u8fd9\u4e9b\u65b9\u9762\uff0cHHVM\u5341\u5206\u7c7b\u4f3c\u4e0eC#\u7684CLR\u548cJava\u7684JVM\u3002 \u5386\u53f2 \u65e9\u57282008\u5e74Facebook\u5c31\u5f00\u59cb\u4f7f\u7528HipHop\uff08\u73b0\u5728\u6210\u4e3aHP<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[111],"_links":{"self":[{"href":"https:\/\/www.codeeel.com\/index.php?rest_route=\/wp\/v2\/posts\/192"}],"collection":[{"href":"https:\/\/www.codeeel.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codeeel.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codeeel.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codeeel.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=192"}],"version-history":[{"count":1,"href":"https:\/\/www.codeeel.com\/index.php?rest_route=\/wp\/v2\/posts\/192\/revisions"}],"predecessor-version":[{"id":193,"href":"https:\/\/www.codeeel.com\/index.php?rest_route=\/wp\/v2\/posts\/192\/revisions\/193"}],"wp:attachment":[{"href":"https:\/\/www.codeeel.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codeeel.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codeeel.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}