{"id":331132,"date":"2021-02-08T08:40:17","date_gmt":"2021-02-08T00:40:17","guid":{"rendered":"http:\/\/4563.org\/?p=331132"},"modified":"2021-02-08T08:40:17","modified_gmt":"2021-02-08T00:40:17","slug":"php-%e6%a1%86%e6%9e%b6-duckphp-1-2-10-%e7%89%88%e5%8f%91%e5%b8%83","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=331132","title":{"rendered":"PHP \u6846\u67b6 DuckPhp 1.2.10 \u7248\u53d1\u5e03"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  PHP \u6846\u67b6 DuckPhp 1.2.10 \u7248\u53d1\u5e03               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dvaknheo <\/span>  <span><i><\/i> 9<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u9879\u76ee\u5730\u5740\uff1a https:\/\/github.com\/dvaknheo\/duckphp<\/p>\n<p>\u9879\u76ee\u5730\u5740\uff1a https:\/\/gitee.com\/dvaknheo\/duckphp<\/p>\n<p>\u4f5c\u8005 QQ: 85811616<\/p>\n<p>\u5b98\u65b9 QQ \u7fa4: 714610448<\/p>\n<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\n<h3>\u5feb\u901f\u4e0a\u624b\uff1a<\/h3>\n<pre><code>composer require dvaknheo\/duckphp # \u7528 require  .\/vendor\/bin\/duckphp new --help   # \u67e5\u770b\u6709\u4ec0\u4e48\u6307\u4ee4 .\/vendor\/bin\/duckphp new    # \u521b\u5efa\u5de5\u7a0b .\/vendor\/bin\/duckphp run    # --host=127.0.0.1 --port=9527 # \u5f00\u59cb web \u670d\u52a1\u5668 <\/code><\/pre>\n<p>\u4f18\u70b9\u5356\u70b9\uff0c\u54ea\u4e2a\u6846\u67b6\u53ef\u4ee5\u51fa\u6765\u4e00\u6218\u3002<\/p>\n<ul>\n<li><strong>\u5168\u7ec4\u4ef6\u53ef\u66ff\u6362<\/strong>\uff0c \u6ca1\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\u7684\u5e93\u90fd\u4e0d\u7b97\u73b0\u4ee3\u5e93<\/li>\n<li><strong>\u9ad8\u53ef\u9760\u6027<\/strong>\uff0c\u65e0\u4f9d\u8d56\u3002 <strong>\u4e0d\u9700\u8981\u5f15\u5165 101 \u4e2a\u7b2c\u4e09\u65b9\u5305\uff0c\u5c31\u80fd\u5de5\u4f5c<\/strong><\/li>\n<li><strong>\u8d85\u4f4e\u8026\u5408<\/strong>\uff0c\u4f60\u7684\u5e94\u7528\u4ee3\u7801\u548c\u6846\u67b6\u4ee3\u7801\u51e0\u4e4e\u6ca1\u8054\u7cfb\u3002<\/li>\n<li><strong>\u7b80\u6d01<\/strong> \u6700\u65b0\u7248\u672c\u9ed8\u8ba4 demo \u8fd0\u884c\u6839\u636e CodeCoverage \u8986\u76d6\u7edf\u8ba1\uff0c \u53ea\u9700\u8981\u884c\u6570 <strong>323 \/ 3791<\/strong> (v1.2.10) \u6267\u884c\u884c\u6570 \/\u603b\u53ef\u6267\u884c\u884c\u6570 \u3002<\/li>\n<li><strong>\u53ef\u6269\u5c55<\/strong>\uff0c\u81ea\u5e26 demo \u5c31\u6709\u628a A \u5de5\u7a0b\u4f5c\u4e3a B \u5de5\u7a0b\u63d2\u4ef6\u7684\u4f8b\u5b50\u3002<\/li>\n<li><strong>\u7075\u6d3b\u81ea\u7531<\/strong> \u4e0d\u7528\u9650\u5b9a\u6b7b\u5728\u4e00\u4e2a app \u7684\u547d\u540d\u7a7a\u95f4\u91cc\u3002<\/li>\n<li><strong>\u6700\u5c0f\u60ca\u8bb6\u539f\u5219<\/strong> (Principle of least astonishment) \u4e0d\u4f1a\u51fa\u73b0\u8fd9\u4e1c\u897f\u600e\u4e48\u5192\u51fa\u6765\u7684\uff0c\u4e3a\u4ec0\u4e48\u6211\u5220\u4e86\u5c31\u5d29\u4e86\u3002<\/li>\n<li><strong>\u533a\u5206\u4f7f\u7528\u89d2\u8272<\/strong> \u5199\u4e1a\u52a1\u7684\uff0c\u4e0d\u8981\u7ba1\u592a\u591a\u6838\u5fc3\u4ee3\u7801\u7684\u4e1c\u897f\u3002<\/li>\n<li><strong>\u5168\u8986\u76d6\u5355\u5143\u6d4b\u8bd5<\/strong> \u6240\u6709\u4ee3\u7801\u90fd\u8dd1\u8fc7\uff0c\u6ca1\u6709\u5199\u4e86\u4ee3\u7801\u6ca1\u6d4b\u7684\u60c5\u51b5<\/li>\n<\/ul>\n<p>\u6587\u6863\u4e5f\u57fa\u672c\u5b8c\u5907\u4e86\u3002\u4f46\u662f\u95ed\u95e8\u9020\u8f66\uff0c\u5e0c\u671b\u80fd\u7ed9\u4e2a\u53cd\u9988\u3002<\/p>\n<p>\u5e94\u7528\u67b6\u6784\uff1a <img decoding=\"async\" loading=\"lazy\" referrerpolicy=\"no-referrer\" rel=\"noreferrer\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2021\/02\/20210208_6021792802de5.svg\" alt=\"PHP \u6846\u67b6 DuckPhp 1.2.10 \u7248\u53d1\u5e03\" \/><\/p>\n<p>\u7cfb\u7edf\u67b6\u6784\uff08\u611f\u8c22 gitee \u63d0\u4f9b svg \u56fe\u5c55\u793a\uff09\uff1a <img decoding=\"async\" loading=\"lazy\" referrerpolicy=\"no-referrer\" rel=\"noreferrer\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2021\/02\/20210208_6021792ce95d7.svg\" alt=\"PHP \u6846\u67b6 DuckPhp 1.2.10 \u7248\u53d1\u5e03\" \/><\/p>\n<p>1.2.7 \u4e4b\u540e\u51e0\u4e2a\u7248\u672c\u7684\u53d1\u5e03\u90fd\u6ca1\u5728 V2EX \u4e0a\u5ba3\u4f20\u3002<\/p>\n<p>\u4e4b\u540e\u505a\u4e86\u7684\uff1a\u7ee7\u7eed\u8c03\u4ee3\u7801\uff0c\u540c\u6b65\u5230 gitee \u5e73\u53f0\uff0c \u5e76\u52a0\u5165 thempowerbenchmark \u6bd4\u8d5b \u3002v1.2.10 \u7248\u672c\u8fd8\u6ca1\u63d0\u4e0a\u53bb \u4e4b\u524d\u7248\u672c\u6709\u4e2a\u5bf9 php8 \u4e0d\u53cb\u597d\u7684\u5730\u65b9\uff1b \u6027\u80fd \u6bd4 laravel \u5f3a\uff0c\u4e0d\u5982 ubiquity\uff0c\u672c\u6765\u60f3\u5c0f\u8c03\u4e00\u4e0b\u4fee\u590d\u63a8\u4e0a\u53bb\u7684\u540e\u9762\u5c31\u5927\u6539\u5230\u73b0\u5728\u4e86\u3002<\/p>\n<p>\u540e\u9762\u8fd8\u6298\u817e\u4e86\u547d\u4ee4\u884c\u7cfb\u7edf\u3002\u5b8c\u5907\u591a\u4e86\u3002<\/p>\n<h3>\u672a\u6765\u8ba1\u5212<\/h3>\n<p>Copy \u4e00\u4e2a\u540e\u53f0\uff0c\u5e26\u5404\u79cd\u6743\u9650\u7684 RABC\uff0c\u53ef\u4ee5\u67e5\u770b\u65e5\u5fd7\u7684 \uff0c\u57fa\u672c\u540e\u53f0\u5e73\u53f0\u3002\u7ed9\u540e\u9762\u4eba\u4e8c\u6b21\u5f00\u53d1\uff0c\u8fd9\u4e5f\u5c06\u662f library \u6a21\u5f0f require \u8fc7\u6765\u5c31\u80fd\u7528\uff0c\u800c\u4e0d\u662f project \u6a21\u5f0f\u4e0a\u8ba9\u4eba\u6539<\/p>\n<p>\u8fd9\u4e2a\u7248\u672c\u4f7f\u7528\u4e86\u81ea\u5df1\u505a\u7684 libcoverage \u5de5\u5177\u505a\u5168\u8986\u76d6\u5355\u5143\u6d4b\u8bd5\uff0c\u8fd9\u662f\u7528\u4e8e\u7ed9 php \u5e93 \u5f00\u53d1\u8005\u7684<\/p>\n<p>\u8fd8\u6709\u4e2a webcoverage \u5de5\u5177\u5de5\u7a0b\u8fd8\u6ca1\u5b8c\u6210\u3002 \u8fd9\u662f\u7ed9 web \u5f00\u53d1\u641e\u5168\u8986\u76d6\u6d4b\u8bd5\u7684<\/p>\n<p>workerman \u7684\u652f\u6301\u4e5f\u8981\u52a0\u4e0a\u53bb\u3002swoole \u4e4b\u524d\u652f\u6301\uff0c\u73b0\u5728\u5f88\u4e45\u6ca1\u6298\u817e\u4e86\u3002swoole \u505a\u5168\u8986\u76d6\u5355\u5143\u6d4b\u8bd5 \u4e0d\u597d\u5f04\uff0c\u6240\u4ee5\u6298\u817e\u70b9\u3002<\/p>\n<p>\u6700\u540e\uff0cgitee \u7528\u6237\u8bf7\u591a\u591a star \u554a [\u62dc\u6258][\u62dc\u6258][\u62dc\u6258] \u5e0c\u671b\u80fd\u5230\u67d0\u4e00\u5929(\u505a\u68a6)\uff0cgitee \u4e0a\u7684 dvaknheo\/duckphp star \u6570\u76ee \u80fd\u8fbe\u7ed9\u5230 github \u4e0a\u7684 Tencent\/Biny star \u6570<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>7<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5032013\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : luxcen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u652f\u6301\uff0c\u52a0\u6cb9                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5032014\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hgjian <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u8fd8\u5728\u575a\u6301                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5032015\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : fyovo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u652f\u6301\u5927\u4f6c \u52a0\u6cb9                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5032016\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hbolive <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u652f\u6301\u4e00\u6ce2\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5032017\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : dvaknheo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @hgjian \u4ee3\u7801\u5c42\u9762\u5fc3\u91cc\u6709\u6570\uff0c\u6587\u6863\u5199\u4e86\u6ca1\u4eba\u53cd\u9988\uff0c\u89c9\u5f97\u6709\u95ee\u9898\u4f46\u4e0d\u77e5\u9053\u95ee\u9898\u5728\u54ea\u3002\u63a8\u5e7f\u65b9\u9762\u4e24\u773c\u4e00\u62b9\u9ed1<\/p>\n<p>\u8fd9\u53ea\u662f\u5f00\u59cb\uff0c\u611f\u8c22\u5927\u5bb6\u7684\u652f\u6301                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5032018\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : longaiwp <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u597d\u4e45\u6ca1\u89c1\u8fc7 PHP \u7684\u6846\u67b6\u4e86\uff0c\u5012\u662f\u6709\u70b9\u6000\u5ff5\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5032019\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Evilk <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u652f\u6301\u4e00\u6ce2<br \/>\u5f00\u6e90\u4e0d\u6613,\u4e14\u884c\u4e14\u73cd\u60dc<br \/>\u6b63\u662f\u56e0\u4e3a\u6709\u4e86\u4f60\u4eec\u8fd9\u6837\u7684\u5949\u732e\u8005,PHP \u624d\u4f1a\u66f4\u52a0\u751f\u751f\u4e0d\u606f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>PHP \u6846\u67b6 DuckPhp 1.&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/331132"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=331132"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/331132\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=331132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=331132"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=331132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}