{"id":48647,"date":"2024-12-02T11:46:43","date_gmt":"2024-12-02T03:46:43","guid":{"rendered":"https:\/\/fwq.ai\/blog\/48647\/"},"modified":"2024-12-02T11:46:43","modified_gmt":"2024-12-02T03:46:43","slug":"php-%e5%be%aa%e7%8e%af%e4%b8%ad-z-%e9%80%92%e5%a2%9e%e4%b8%ba%e4%bd%95%e5%8f%98%e4%b8%ba-aa-%e8%80%8c%e4%b8%8d%e6%98%af-az%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/48647\/","title":{"rendered":"PHP \u5faa\u73af\u4e2d \\&#8217;Z\\&#8217; \u9012\u589e\u4e3a\u4f55\u53d8\u4e3a \\&#8217;AA\\&#8217; \u800c\u4e0d\u662f \\&#8217;AZ\\&#8217;\uff1f"},"content":{"rendered":"<p><b><\/b> <\/p>\n<h1>PHP \u5faa\u73af\u4e2d \\&#8217;Z\\&#8217; \u9012\u589e\u4e3a\u4f55\u53d8\u4e3a \\&#8217;AA\\&#8217; \u800c\u4e0d\u662f \\&#8217;AZ\\&#8217;\uff1f<\/h1>\n<p>\u4eca\u5929\u7c73\u4e91\u7ed9\u5927\u5bb6\u5e26\u6765\u4e86<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300aPHP \u5faa\u73af\u4e2d \\&#8217;Z\\&#8217; \u9012\u589e\u4e3a\u4f55\u53d8\u4e3a \\&#8217;AA\\&#8217; \u800c\u4e0d\u662f \\&#8217;AZ\\&#8217;\uff1f\u300b<\/span>\uff0c\u5176\u4e2d\u6d89\u53ca\u5230\u7684\u77e5\u8bc6\u70b9\u5305\u62ec<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\uff0c\u65e0\u8bba\u4f60\u662f\u5c0f\u767d\u8fd8\u662f\u8001\u624b\uff0c\u90fd\u9002\u5408\u770b\u4e00\u770b\u54e6~\u6709\u597d\u7684\u5efa\u8bae\u4e5f\u6b22\u8fce\u5927\u5bb6\u5728\u8bc4\u8bba\u7559\u8a00\uff0c\u82e5\u662f\u770b\u5b8c\u6709\u6240\u6536\u83b7\uff0c\u4e5f\u5e0c\u671b\u5927\u5bb6\u80fd\u591a\u591a\u70b9\u8d5e\u652f\u6301\u5440\uff01\u4e00\u8d77\u52a0\u6cb9\u5b66\u4e60~<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241029\/173018631267208c48cb13b.jpg\" class=\"aligncenter\" title=\"PHP \u5faa\u73af\u4e2d \\&#8217;Z\\&#8217; \u9012\u589e\u4e3a\u4f55\u53d8\u4e3a \\&#8217;AA\\&#8217; \u800c\u4e0d\u662f \\&#8217;AZ\\&#8217;\uff1f\u63d2\u56fe\" alt=\"PHP \u5faa\u73af\u4e2d \\&#8217;Z\\&#8217; \u9012\u589e\u4e3a\u4f55\u53d8\u4e3a \\&#8217;AA\\&#8217; \u800c\u4e0d\u662f \\&#8217;AZ\\&#8217;\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>php for \u5faa\u73af\u4e2d &#8216;z&#8217; \u7684\u9012\u589e\u7591\u95ee<\/strong><\/p>\n<p><strong>\u95ee\u9898\uff1a<\/strong><\/p>\n<p>&lt;?php<br \/>$string = &#8221;;<br \/>$j = &#8216;z&#8217;;<br \/>for ($i = &#8216;a&#8217;; $i &lt;= $j; $i++) {<\/p>\n<pre>$string .= $i;<\/pre>\n<p>}<br \/>echo strlen($string);<br \/>?&gt;<\/p>\n<ul>\n<li><strong>\u4e3a\u4ec0\u4e48 y++ \u4e4b\u540e\u662f aa\uff0c\u800c\u4e0d\u662f az\uff1f<\/strong><\/li>\n<li><strong>\u4e3a\u4f55 $i \u548c $j \u6309 ascii \u7801\u6bd4\u8f83\u65f6\uff0c$i=yz \u65f6\u5c31\u8df3\u51fa\u5faa\u73af\uff1f<\/strong><\/li>\n<\/ul>\n<p><strong>\u56de\u7b54\uff1a<\/strong><\/p>\n<p><strong>1. &#8216;z&#8217; \u9012\u589e\u540e\u4e3a &#8216;aa&#8217; \u7684\u4f9d\u636e<\/strong><\/p>\n<p>php \u5728\u5904\u7406\u5b57\u7b26\u53d8\u91cf\u7684\u7b97\u672f\u8fd0\u7b97\u65f6\u9075\u5faa perl \u7684\u60ef\u4f8b\u3002\u5728 perl \u4e2d\uff0c&#8217;z&#8217;+1 \u53d8\u6210 &#8216;aa&#8217;\u3002\u56e0\u6b64\uff0c\u5728 php \u4e2d\uff0c&#8217;z&#8217;+1 \u4e5f\u53d8\u6210 &#8216;aa&#8217;\u3002<\/p>\n<p><strong>2. php \u7684\u5b57\u7b26\u4e32\u6bd4\u8f83<\/strong><\/p>\n<p>php \u7684\u5b57\u7b26\u4e32\u6bd4\u8f83\u4e0d\u662f\u7eaf\u7cb9\u7684 ascii \u7801\u6bd4\u8f83\u3002\u5bf9\u4e8e &#8216;zz&#8217; \u548c &#8216;z&#8217; \u7684\u6bd4\u8f83\uff0cphp \u4f1a\u6bd4\u8f83\u5b83\u4eec\u7684\u7b2c\u4e00\u4e2a\u5b57\u7b26\u3002\u7531\u4e8e\u4e24\u8005\u76f8\u7b49\uff0cphp \u4f1a\u6bd4\u8f83\u5b83\u4eec\u7684\u957f\u5ea6\u3002&#8217;zz&#8217; \u7684\u957f\u5ea6\u66f4\u957f\uff0c\u56e0\u6b64 &#8216;zz&#8217; \u88ab\u8ba4\u4e3a\u6bd4 &#8216;z&#8217; \u5927\uff0c\u8fd9\u5c31\u89e3\u91ca\u4e86\u4e3a\u4ec0\u4e48\u5faa\u73af\u5728 $i=yz \u65f6\u8df3\u51fa\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u300aPHP \u5faa\u73af\u4e2d \\&#8217;Z\\&#8217; \u9012\u589e\u4e3a\u4f55\u53d8\u4e3a \\&#8217;AA\\&#8217; \u800c\u4e0d\u662f \\&#8217;AZ\\&#8217;\uff1f\u300b\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u5173\u4e8e\u7684\u8d44\u6599\u8bf7\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP \u5faa\u73af\u4e2d \\&#8217;Z\\&#8217; \u9012\u589e\u4e3a\u4f55\u53d8\u4e3a \\&#8217;AA\\&#8217; \u800c\u4e0d\u662f \\&#8217;AZ\\&#8217;\uff1f \u4eca\u5929\u7c73\u4e91\u7ed9\u5927\u5bb6\u5e26\u6765\u4e86\u300aPHP \u5faa\u73af\u4e2d \\&#8217;Z\\&#8217; \u9012\u589e\u4e3a\u4f55\u53d8\u4e3a \\&#8217;AA\\&#8217; \u800c\u4e0d\u662f \\&#8217;AZ\\&#8217;\uff1f\u300b\uff0c\u5176\u4e2d\u6d89\u53ca\u5230\u7684\u77e5\u8bc6\u70b9\u5305\u62ec\u7b49\u7b49\uff0c\u65e0\u8bba\u4f60\u662f\u5c0f\u767d\u8fd8\u662f\u8001\u624b\uff0c\u90fd\u9002\u5408\u770b\u4e00\u770b\u54e6~\u6709\u597d\u7684\u5efa\u8bae\u4e5f\u6b22\u8fce\u5927\u5bb6\u5728\u8bc4\u8bba\u7559\u8a00\uff0c\u82e5\u662f\u770b\u5b8c\u6709\u6240\u6536\u83b7\uff0c\u4e5f\u5e0c\u671b\u5927\u5bb6\u80fd\u591a\u591a\u70b9\u8d5e\u652f\u6301\u5440\uff01\u4e00\u8d77\u52a0\u6cb9\u5b66\u4e60~ php for \u5faa\u73af\u4e2d &#8216;z&#8217; \u7684\u9012\u589e\u7591\u95ee \u95ee\u9898\uff1a &lt;?php$string = &#8221;;$j = &#8216;z&#8217;;for ($i = &#8216;a&#8217;; $i &lt;= $j; $i++) { $string .= $i; }echo strlen($string);?&gt; \u4e3a\u4ec0\u4e48 y++ \u4e4b\u540e\u662f aa\uff0c\u800c\u4e0d\u662f az\uff1f \u4e3a\u4f55 $i \u548c $j \u6309 ascii \u7801\u6bd4\u8f83\u65f6\uff0c$i=yz \u65f6\u5c31\u8df3\u51fa\u5faa\u73af\uff1f \u56de\u7b54\uff1a 1. &#8216;z&#8217; \u9012\u589e\u540e\u4e3a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-48647","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/48647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=48647"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/48647\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=48647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=48647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=48647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}