{"id":1970,"date":"2023-04-28T14:26:17","date_gmt":"2023-04-28T06:26:17","guid":{"rendered":"\/?p=1970"},"modified":"2023-04-28T14:40:54","modified_gmt":"2023-04-28T06:40:54","slug":"php%e8%af%ad%e6%b3%95","status":"publish","type":"post","link":"\/?p=1970","title":{"rendered":"php\u8bed\u6cd5"},"content":{"rendered":"<blockquote>\n<p>\u57fa\u672c\u4e0a\u662f\u7167\u6284\u83dc\u9e1f\u6559\u7a0b\uff0c\u8be6\u60c5\u53ef\u89c1\uff1a<br \/>\n<a href=\"https:\/\/www.runoob.com\/php\/php-tutorial.html\">https:\/\/www.runoob.com\/php\/php-tutorial.html<\/a><\/p>\n<h2>PHP\u4ee3\u7801\u6807\u8bb0<\/h2>\n<\/blockquote>\n<p>\u5728PHP\u5386\u53f2\u53d1\u5c55\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u6807\u8bb0\u6765\u533a\u5206PHP\u811a\u672c\uff0c<\/p>\n<ul>\n<li>\n<p>ASP\u6807\u8bb0\uff1a&lt;%php\u4ee3\u7801%&gt;<\/p>\n<\/li>\n<li>\n<p>\u77ed\u6807\u8bb0\uff1a\\&lt;? php\u4ee3\u7801 ?&gt;\uff0c\u4ee5\u4e0a\u4e24\u79cd\u57fa\u672c\u5f03\u7528\uff0c\u5982\u679c\u8981\u4f7f\u7528\u90a3\u4e48\u9700\u8981\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u5f00\u542f\uff0c<\/p>\n<\/li>\n<li>\n<p>\u811a\u672c\u6807\u8bb0\uff1a\\<script language=\"php\">php\u4ee3\u7801\\<\/script><\/p>\n<\/li>\n<li>\n<p>\u6807\u51c6\u6807\u8bb0\uff08\u5e38\u7528\uff09:\\&lt;?php php\u4ee3\u7801 ?&gt;<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"language-php+HTML\">&lt;html&gt;\n    &lt;body&gt;\n        &lt;b&gt;\n            &lt;!-- &lt;script language=&quot;php&quot;&gt;\n                echo &#039;hello world&#039;;\n            &lt;\/script&gt; --&gt;\n            &lt;?php\n                echo &#039;hello world&#039;;\n            ?&gt;\n        &lt;\/b&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<h2>\u53d8\u91cf\u547d\u540d<\/h2>\n<pre><code class=\"language-php\">&lt;?php\n$txt=&quot;Hello world!&quot;;\n$x=5;\n$y=10.5;\n?&gt;<\/code><\/pre>\n<p>PHP \u6ca1\u6709\u58f0\u660e\u53d8\u91cf\u7684\u547d\u4ee4\u3002<\/p>\n<p>\u53d8\u91cf\u5728\u60a8\u7b2c\u4e00\u6b21\u8d4b\u503c\u7ed9\u5b83\u7684\u65f6\u5019\u88ab\u521b\u5efa\uff08\u7c7b\u4f3cpython\uff09<\/p>\n<p>PHP \u53d8\u91cf\u89c4\u5219\uff1a<\/p>\n<ul>\n<li>\u53d8\u91cf\u4ee5 $ \u7b26\u53f7\u5f00\u59cb\uff0c\u540e\u9762\u8ddf\u7740\u53d8\u91cf\u7684\u540d\u79f0<\/li>\n<li>\u53d8\u91cf\u540d\u5fc5\u987b\u4ee5\u5b57\u6bcd\u6216\u8005\u4e0b\u5212\u7ebf\u5b57\u7b26\u5f00\u59cb<\/li>\n<li>\u53d8\u91cf\u540d\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u3001\u6570\u5b57\u4ee5\u53ca\u4e0b\u5212\u7ebf\uff08A-z\u30010-9 \u548c _ \uff09<\/li>\n<li>\u53d8\u91cf\u540d\u4e0d\u80fd\u5305\u542b\u7a7a\u683c<\/li>\n<li>\u53d8\u91cf\u540d\u662f\u533a\u5206\u5927\u5c0f\u5199\u7684\uff08$y \u548c $Y \u662f\u4e24\u4e2a\u4e0d\u540c\u7684\u53d8\u91cf\uff09<\/li>\n<\/ul>\n<h3><strong>PHP global \u5173\u952e\u5b57<\/strong><\/h3>\n<p>global \u5173\u952e\u5b57\u7528\u4e8e\u51fd\u6570\u5185\u8bbf\u95ee\u5168\u5c40\u53d8\u91cf\u3002<\/p>\n<p>\u5728\u51fd\u6570\u5185\u8c03\u7528\u51fd\u6570\u5916\u5b9a\u4e49\u7684\u5168\u5c40\u53d8\u91cf\uff0c\u6211\u4eec\u9700\u8981\u5728\u51fd\u6570\u4e2d\u7684\u53d8\u91cf\u524d\u52a0\u4e0a global \u5173\u952e\u5b57\uff1a<\/p>\n<pre><code class=\"language-php\">&lt;?php\n$x=5;\n$y=10;\n\nfunction myTest()\n{\n    global $x,$y;\n    $y=$x+$y;\n}\n\nmyTest();\necho $y; \/\/ \u8f93\u51fa 15\n?&gt;<\/code><\/pre>\n<h3><strong>Static \u4f5c\u7528\u57df<\/strong><\/h3>\n<p>\u5f53\u4e00\u4e2a\u51fd\u6570\u5b8c\u6210\u65f6\uff0c\u5b83\u7684\u6240\u6709\u53d8\u91cf\u901a\u5e38\u90fd\u4f1a\u88ab\u5220\u9664\u3002\u7136\u800c\uff0c\u6709\u65f6\u5019\u60a8\u5e0c\u671b\u67d0\u4e2a\u5c40\u90e8\u53d8\u91cf\u4e0d\u8981\u88ab\u5220\u9664\u3002<\/p>\n<p>\u8981\u505a\u5230\u8fd9\u4e00\u70b9\uff0c\u8bf7\u5728\u60a8\u7b2c\u4e00\u6b21\u58f0\u660e\u53d8\u91cf\u65f6\u4f7f\u7528 <strong>static<\/strong> \u5173\u952e\u5b57\uff1a<\/p>\n<pre><code class=\"language-php\">&lt;?php\nfunction myTest()\n{\n    static $x=0;\n    echo $x;\n    $x++;\n    echo PHP_EOL;    \/\/ \u6362\u884c\u7b26\n}\n\nmyTest();\nmyTest();\nmyTest();\n?&gt;<\/code><\/pre>\n<h2>\u6570\u636e\u7c7b\u578b<\/h2>\n<p>PHP \u53d8\u91cf\u5b58\u50a8\u4e0d\u540c\u7684\u7c7b\u578b\u7684\u6570\u636e\uff0c\u4e0d\u540c\u7684\u6570\u636e\u7c7b\u578b\u53ef\u4ee5\u505a\u4e0d\u4e00\u6837\u7684\u4e8b\u60c5\u3002<\/p>\n<p>PHP \u652f\u6301\u4ee5\u4e0b\u51e0\u79cd\u6570\u636e\u7c7b\u578b:<\/p>\n<ul>\n<li>String\uff08\u5b57\u7b26\u4e32\uff09<\/li>\n<li>Integer\uff08\u6574\u578b\uff09<\/li>\n<li>Float\uff08\u6d6e\u70b9\u578b\uff09<\/li>\n<li>Boolean\uff08\u5e03\u5c14\u578b\uff09<\/li>\n<li>Array\uff08\u6570\u7ec4\uff09<\/li>\n<li>Object\uff08\u5bf9\u8c61\uff09<\/li>\n<li>NULL\uff08\u7a7a\u503c\uff09<\/li>\n<li>Resource\uff08\u8d44\u6e90\u7c7b\u578b\uff09<\/li>\n<\/ul>\n<p>PHP var_dump() \u51fd\u6570\u8fd4\u56de\u53d8\u91cf\u7684\u6570\u636e\u7c7b\u578b\u548c\u503c\uff0c\u7c7b\u4f3cPython\u7684type()<\/p>\n<pre><code class=\"language-php\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;body&gt;\n\n&lt;?php\nclass Car\n{\n    var $color;\n    function __construct($color=&quot;green&quot;) {\n      $this-&gt;color = $color;\n    }\n    function what_color() {\n      return $this-&gt;color;\n    }\n}\n\nfunction print_vars($obj) {\n   foreach (get_object_vars($obj) as $prop =&gt; $val) {\n     echo &quot;\\t$prop = $val\\n&quot;;\n   }\n}\n\n\/\/ \u5b9e\u4f8b\u4e00\u4e2a\u5bf9\u8c61\n$herbie = new Car(&quot;white&quot;);\n\n\/\/ \u663e\u793a herbie \u5c5e\u6027\necho &quot;\\therbie: Properties\\n&quot;;\nprint_vars($herbie);\n\n?&gt;  \n\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<h2>\u5b57\u7b26\u4e32<\/h2>\n<h3>PHP \u5e76\u7f6e\u8fd0\u7b97\u7b26<\/h3>\n<p>\u5728 PHP \u4e2d\uff0c\u53ea\u6709\u4e00\u4e2a\u5b57\u7b26\u4e32\u8fd0\u7b97\u7b26\u3002<\/p>\n<p>\u5e76\u7f6e\u8fd0\u7b97\u7b26 (.) \u7528\u4e8e\u628a\u4e24\u4e2a\u5b57\u7b26\u4e32\u503c\u8fde\u63a5\u8d77\u6765\u3002<\/p>\n<p>\u4e0b\u9762\u7684\u5b9e\u4f8b\u6f14\u793a\u4e86\u5982\u4f55\u5c06\u4e24\u4e2a\u5b57\u7b26\u4e32\u53d8\u91cf\u8fde\u63a5\u5728\u4e00\u8d77\uff1a<\/p>\n<pre><code class=\"language-php\">&lt;?php\n$txt1=&quot;Hello world!&quot;;\n$txt2=&quot;What a nice day!&quot;;\necho $txt1 . &quot; &quot; . $txt2;\n?&gt;<\/code><\/pre>\n<p>\u4e0a\u9762\u7684\u4ee3\u7801\u5c06\u8f93\u51fa\uff1aHello world! What a nice day!<\/p>\n<p><strong>\u63d0\u793a\uff1a<\/strong>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5df2\u7ecf\u4f7f\u7528\u4e86\u4e24\u6b21\u5e76\u7f6e\u8fd0\u7b97\u7b26\u3002\u8fd9\u662f\u7531\u4e8e\u6211\u4eec\u9700\u8981\u5728\u4e24\u4e2a\u5b57\u7b26\u4e32\u4e4b\u95f4\u63d2\u5165\u4e00\u4e2a\u7a7a\u683c\u3002<\/p>\n<h3>PHP strlen() \u51fd\u6570<\/h3>\n<p>\u6709\u65f6\u77e5\u9053\u5b57\u7b26\u4e32\u503c\u7684\u957f\u5ea6\u662f\u5f88\u6709\u7528\u7684\u3002<\/p>\n<p>strlen() \u51fd\u6570\u8fd4\u56de\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\uff08\u5b57\u8282\u6570\uff09\u3002<\/p>\n<p>\u4e0b\u9762\u7684\u5b9e\u4f8b\u8fd4\u56de\u5b57\u7b26\u4e32 &quot;Hello world!&quot; \u7684\u957f\u5ea6\uff1a<\/p>\n<pre><code class=\"language-php\">&lt;?php\necho strlen(&quot;Hello world!&quot;);\n?&gt;<\/code><\/pre>\n<p>\u4e0a\u9762\u7684\u4ee3\u7801\u5c06\u8f93\u51fa\uff1a12<\/p>\n<p><strong>\u63d0\u793a\uff1a<\/strong>strlen() \u5e38\u5e38\u7528\u5728\u5faa\u73af\u548c\u5176\u4ed6\u51fd\u6570\u4e2d\uff0c\u56e0\u4e3a\u90a3\u65f6\u786e\u5b9a\u5b57\u7b26\u4e32\u4f55\u65f6\u7ed3\u675f\u662f\u5f88\u91cd\u8981\u7684\u3002\uff08\u4f8b\u5982\uff0c\u5728\u5faa\u73af\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u5728\u5b57\u7b26\u4e32\u4e2d\u7684\u6700\u540e\u4e00\u4e2a\u5b57\u7b26\u4e4b\u540e\u7ed3\u675f\u5faa\u73af\u3002\uff09<\/p>\n<h3>PHP strpos() \u51fd\u6570<\/h3>\n<p>strpos() \u51fd\u6570\u7528\u4e8e\u5728\u5b57\u7b26\u4e32\u5185\u67e5\u627e\u4e00\u4e2a\u5b57\u7b26\u6216\u4e00\u6bb5\u6307\u5b9a\u7684\u6587\u672c\u3002<\/p>\n<p>\u5982\u679c\u5728\u5b57\u7b26\u4e32\u4e2d\u627e\u5230\u5339\u914d\uff0c\u8be5\u51fd\u6570\u4f1a\u8fd4\u56de\u7b2c\u4e00\u4e2a\u5339\u914d\u7684\u5b57\u7b26\u4f4d\u7f6e\u3002\u5982\u679c\u672a\u627e\u5230\u5339\u914d\uff0c\u5219\u8fd4\u56de FALSE\u3002<\/p>\n<p>\u4e0b\u9762\u7684\u5b9e\u4f8b\u5728\u5b57\u7b26\u4e32 &quot;Hello world!&quot; \u4e2d\u67e5\u627e\u6587\u672c &quot;world&quot;\uff1a<\/p>\n<pre><code class=\"language-php\">&lt;?php\necho strpos(&quot;Hello world!&quot;,&quot;world&quot;);\n?&gt;<\/code><\/pre>\n<p>\u4e0a\u9762\u7684\u4ee3\u7801\u5c06\u8f93\u51fa\uff1a6<\/p>\n<p><strong>\u63d0\u793a\uff1a<\/strong>\u5728\u4e0a\u9762\u7684\u5b9e\u4f8b\u4e2d\uff0c\u5b57\u7b26\u4e32 &quot;world&quot; \u7684\u4f4d\u7f6e\u662f 6\u3002\u4e4b\u6240\u4ee5\u662f 6 \u800c\u4e0d\u662f 7 \u7684\u539f\u56e0\u662f\uff0c\u5b57\u7b26\u4e32\u4e2d\u7b2c\u4e00\u4e2a\u5b57\u7b26\u7684\u4f4d\u7f6e\u662f 0\uff0c\u800c\u4e0d\u662f 1\u3002<\/p>\n<h2>php\u8fd0\u7b97\u7b26<\/h2>\n<h3>PHP \u7b97\u672f\u8fd0\u7b97\u7b26<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\u8fd0\u7b97\u7b26<\/th>\n<th style=\"text-align: left;\">\u540d\u79f0<\/th>\n<th style=\"text-align: left;\">\u63cf\u8ff0<\/th>\n<th style=\"text-align: left;\">\u5b9e\u4f8b<\/th>\n<th style=\"text-align: left;\">\u7ed3\u679c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">x + y<\/td>\n<td style=\"text-align: left;\">\u52a0<\/td>\n<td style=\"text-align: left;\">x \u548c y \u7684\u548c<\/td>\n<td style=\"text-align: left;\">2 + 2<\/td>\n<td style=\"text-align: left;\">4<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x - y<\/td>\n<td style=\"text-align: left;\">\u51cf<\/td>\n<td style=\"text-align: left;\">x \u548c y \u7684\u5dee<\/td>\n<td style=\"text-align: left;\">5 - 2<\/td>\n<td style=\"text-align: left;\">3<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x * y<\/td>\n<td style=\"text-align: left;\">\u4e58<\/td>\n<td style=\"text-align: left;\">x \u548c y \u7684\u79ef<\/td>\n<td style=\"text-align: left;\">5 * 2<\/td>\n<td style=\"text-align: left;\">10<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x \/ y<\/td>\n<td style=\"text-align: left;\">\u9664<\/td>\n<td style=\"text-align: left;\">x \u548c y \u7684\u5546<\/td>\n<td style=\"text-align: left;\">15 \/ 5<\/td>\n<td style=\"text-align: left;\">3<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x % y<\/td>\n<td style=\"text-align: left;\">\u6a21\uff08\u9664\u6cd5\u7684\u4f59\u6570\uff09<\/td>\n<td style=\"text-align: left;\">x \u9664\u4ee5 y \u7684\u4f59\u6570<\/td>\n<td style=\"text-align: left;\">5 % 2 10 % 8 10 % 2<\/td>\n<td style=\"text-align: left;\">1 2 0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">-x<\/td>\n<td style=\"text-align: left;\">\u8bbe\u7f6e\u8d1f\u6570<\/td>\n<td style=\"text-align: left;\">\u53d6 x \u7684\u76f8\u53cd\u7b26\u53f7<\/td>\n<td style=\"text-align: left;\"><code>&lt;?php $x = 2; echo -$x; ?&gt;<\/code><\/td>\n<td style=\"text-align: left;\">-2<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">~x<\/td>\n<td style=\"text-align: left;\">\u53d6\u53cd<\/td>\n<td style=\"text-align: left;\">x \u53d6\u53cd\uff0c\u6309\u4e8c\u8fdb\u5236\u4f4d\u8fdb\u884c&quot;\u53d6\u53cd&quot;\u8fd0\u7b97\u3002\u8fd0\u7b97\u89c4\u5219\uff1a<code>~1=-2;    ~0=-1;<\/code><\/td>\n<td style=\"text-align: left;\"><code>&lt;?php $x = 2; echo ~$x; ?&gt;<\/code><\/td>\n<td style=\"text-align: left;\">-3<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">a . b<\/td>\n<td style=\"text-align: left;\">\u5e76\u7f6e<\/td>\n<td style=\"text-align: left;\">\u8fde\u63a5\u4e24\u4e2a\u5b57\u7b26\u4e32<\/td>\n<td style=\"text-align: left;\">&quot;Hi&quot; . &quot;Ha&quot;<\/td>\n<td style=\"text-align: left;\">HiHa<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>PHP \u8d4b\u503c\u8fd0\u7b97\u7b26<\/h3>\n<p>\u5728 PHP \u4e2d\uff0c\u57fa\u672c\u7684\u8d4b\u503c\u8fd0\u7b97\u7b26\u662f <strong>=<\/strong>\u3002\u5b83\u610f\u5473\u7740\u5de6\u64cd\u4f5c\u6570\u88ab\u8bbe\u7f6e\u4e3a\u53f3\u4fa7\u8868\u8fbe\u5f0f\u7684\u503c\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c<strong>$x = 5<\/strong> \u7684\u503c\u662f 5\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\u8fd0\u7b97\u7b26<\/th>\n<th style=\"text-align: left;\">\u7b49\u540c\u4e8e<\/th>\n<th style=\"text-align: left;\">\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">x = y<\/td>\n<td style=\"text-align: left;\">x = y<\/td>\n<td style=\"text-align: left;\">\u5de6\u64cd\u4f5c\u6570\u88ab\u8bbe\u7f6e\u4e3a\u53f3\u4fa7\u8868\u8fbe\u5f0f\u7684\u503c<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x += y<\/td>\n<td style=\"text-align: left;\">x = x + y<\/td>\n<td style=\"text-align: left;\">\u52a0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x -= y<\/td>\n<td style=\"text-align: left;\">x = x - y<\/td>\n<td style=\"text-align: left;\">\u51cf<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x *= y<\/td>\n<td style=\"text-align: left;\">x = x * y<\/td>\n<td style=\"text-align: left;\">\u4e58<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x \/= y<\/td>\n<td style=\"text-align: left;\">x = x \/ y<\/td>\n<td style=\"text-align: left;\">\u9664<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x %= y<\/td>\n<td style=\"text-align: left;\">x = x % y<\/td>\n<td style=\"text-align: left;\">\u6a21\uff08\u9664\u6cd5\u7684\u4f59\u6570\uff09<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">a .= b<\/td>\n<td style=\"text-align: left;\">a = a . b<\/td>\n<td style=\"text-align: left;\">\u8fde\u63a5\u4e24\u4e2a\u5b57\u7b26\u4e32<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>PHP \u9012\u589e\/\u9012\u51cf\u8fd0\u7b97\u7b26<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\u8fd0\u7b97\u7b26<\/th>\n<th style=\"text-align: left;\">\u540d\u79f0<\/th>\n<th style=\"text-align: left;\">\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">++ x<\/td>\n<td style=\"text-align: left;\">\u9884\u9012\u589e<\/td>\n<td style=\"text-align: left;\">x \u52a0 1\uff0c\u7136\u540e\u8fd4\u56de x<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x ++<\/td>\n<td style=\"text-align: left;\">\u540e\u9012\u589e<\/td>\n<td style=\"text-align: left;\">\u8fd4\u56de x\uff0c\u7136\u540e x \u52a0 1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">-- x<\/td>\n<td style=\"text-align: left;\">\u9884\u9012\u51cf<\/td>\n<td style=\"text-align: left;\">x \u51cf 1\uff0c\u7136\u540e\u8fd4\u56de x<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x --<\/td>\n<td style=\"text-align: left;\">\u540e\u9012\u51cf<\/td>\n<td style=\"text-align: left;\">\u8fd4\u56de x\uff0c\u7136\u540e x \u51cf 1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>PHP \u6bd4\u8f83\u8fd0\u7b97\u7b26<\/h3>\n<p>\u6bd4\u8f83\u64cd\u4f5c\u7b26\u53ef\u4ee5\u8ba9\u60a8\u6bd4\u8f83\u4e24\u4e2a\u503c\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\u8fd0\u7b97\u7b26<\/th>\n<th style=\"text-align: left;\">\u540d\u79f0<\/th>\n<th style=\"text-align: left;\">\u63cf\u8ff0<\/th>\n<th style=\"text-align: left;\">\u5b9e\u4f8b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">x == y<\/td>\n<td style=\"text-align: left;\">\u7b49\u4e8e<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u7b49\u4e8e y\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">5==8 \u8fd4\u56de false<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x === y<\/td>\n<td style=\"text-align: left;\">\u7edd\u5bf9\u7b49\u4e8e<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u7b49\u4e8e y\uff0c\u4e14\u5b83\u4eec\u7c7b\u578b\u76f8\u540c\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">5===&quot;5&quot; \u8fd4\u56de false<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x != y<\/td>\n<td style=\"text-align: left;\">\u4e0d\u7b49\u4e8e<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u4e0d\u7b49\u4e8e y\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">5!=8 \u8fd4\u56de true<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x &lt;&gt; y<\/td>\n<td style=\"text-align: left;\">\u4e0d\u7b49\u4e8e<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u4e0d\u7b49\u4e8e y\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">5&lt;&gt;8 \u8fd4\u56de true<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x !== y<\/td>\n<td style=\"text-align: left;\">\u4e0d\u7edd\u5bf9\u7b49\u4e8e<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u4e0d\u7b49\u4e8e y\uff0c\u6216\u5b83\u4eec\u7c7b\u578b\u4e0d\u76f8\u540c\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">5!==&quot;5&quot; \u8fd4\u56de true<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x &gt; y<\/td>\n<td style=\"text-align: left;\">\u5927\u4e8e<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u5927\u4e8e y\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">5&gt;8 \u8fd4\u56de false<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x &lt; y<\/td>\n<td style=\"text-align: left;\">\u5c0f\u4e8e<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u5c0f\u4e8e y\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">5&lt;8 \u8fd4\u56de true<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x &gt;= y<\/td>\n<td style=\"text-align: left;\">\u5927\u4e8e\u7b49\u4e8e<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u5927\u4e8e\u6216\u8005\u7b49\u4e8e y\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">5&gt;=8 \u8fd4\u56de false<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x &lt;= y<\/td>\n<td style=\"text-align: left;\">\u5c0f\u4e8e\u7b49\u4e8e<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u5c0f\u4e8e\u6216\u8005\u7b49\u4e8e y\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">5&lt;=8 \u8fd4\u56de true<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>PHP \u903b\u8f91\u8fd0\u7b97\u7b26<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\u8fd0\u7b97\u7b26<\/th>\n<th style=\"text-align: left;\">\u540d\u79f0<\/th>\n<th style=\"text-align: left;\">\u63cf\u8ff0<\/th>\n<th style=\"text-align: left;\">\u5b9e\u4f8b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">x and y<\/td>\n<td style=\"text-align: left;\">\u4e0e<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u548c y \u90fd\u4e3a true\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">x=6 y=3 (x &lt; 10 and y &gt; 1) \u8fd4\u56de true<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x or y<\/td>\n<td style=\"text-align: left;\">\u6216<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u548c y \u81f3\u5c11\u6709\u4e00\u4e2a\u4e3a true\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">x=6 y=3 (x==6 or y==5) \u8fd4\u56de true<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x xor y<\/td>\n<td style=\"text-align: left;\">\u5f02\u6216<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u548c y \u6709\u4e14\u4ec5\u6709\u4e00\u4e2a\u4e3a true\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">x=6 y=3 (x==6 xor y==3) \u8fd4\u56de false<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x &amp;&amp; y<\/td>\n<td style=\"text-align: left;\">\u4e0e<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u548c y \u90fd\u4e3a true\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">x=6 y=3 (x &lt; 10 &amp;&amp; y &gt; 1) \u8fd4\u56de true<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x || y<\/td>\n<td style=\"text-align: left;\">\u6216<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u548c y \u81f3\u5c11\u6709\u4e00\u4e2a\u4e3a true\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">x=6 y=3 (x==5 || y==5) \u8fd4\u56de false<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">! x<\/td>\n<td style=\"text-align: left;\">\u975e<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u4e0d\u4e3a true\uff0c\u5219\u8fd4\u56de true<\/td>\n<td style=\"text-align: left;\">x=6 y=3 !(x==y) \u8fd4\u56de true<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>PHP \u6570\u7ec4\u8fd0\u7b97\u7b26<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\u8fd0\u7b97\u7b26<\/th>\n<th style=\"text-align: left;\">\u540d\u79f0<\/th>\n<th style=\"text-align: left;\">\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">x + y<\/td>\n<td style=\"text-align: left;\">\u96c6\u5408<\/td>\n<td style=\"text-align: left;\">x \u548c y \u7684\u96c6\u5408<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x == y<\/td>\n<td style=\"text-align: left;\">\u76f8\u7b49<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u548c y \u5177\u6709\u76f8\u540c\u7684\u952e\/\u503c\u5bf9\uff0c\u5219\u8fd4\u56de true<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x === y<\/td>\n<td style=\"text-align: left;\">\u6052\u7b49<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u548c y \u5177\u6709\u76f8\u540c\u7684\u952e\/\u503c\u5bf9\uff0c\u4e14\u987a\u5e8f\u76f8\u540c\u7c7b\u578b\u76f8\u540c\uff0c\u5219\u8fd4\u56de true<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x != y<\/td>\n<td style=\"text-align: left;\">\u4e0d\u76f8\u7b49<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u4e0d\u7b49\u4e8e y\uff0c\u5219\u8fd4\u56de true<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x &lt;&gt; y<\/td>\n<td style=\"text-align: left;\">\u4e0d\u76f8\u7b49<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u4e0d\u7b49\u4e8e y\uff0c\u5219\u8fd4\u56de true<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">x !== y<\/td>\n<td style=\"text-align: left;\">\u4e0d\u6052\u7b49<\/td>\n<td style=\"text-align: left;\">\u5982\u679c x \u4e0d\u7b49\u4e8e y\uff0c\u5219\u8fd4\u56de true<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u4e09\u5143\u8fd0\u7b97\u7b26<\/h3>\n<p>\u53e6\u4e00\u4e2a\u6761\u4ef6\u8fd0\u7b97\u7b26\u662f&quot;?:&quot;\uff08\u6216\u4e09\u5143\uff09\u8fd0\u7b97\u7b26 \u3002<\/p>\n<p><strong>\u8bed\u6cd5\u683c\u5f0f<\/strong><\/p>\n<pre><code>(expr1) ? (expr2) : (expr3) <\/code><\/pre>\n<p>\u5bf9 expr1 \u6c42\u503c\u4e3a TRUE \u65f6\u7684\u503c\u4e3a expr2\uff0c\u5728 expr1 \u6c42\u503c\u4e3a FALSE \u65f6\u7684\u503c\u4e3a expr3\u3002<\/p>\n<p>\u81ea PHP 5.3 \u8d77\uff0c\u53ef\u4ee5\u7701\u7565\u4e09\u5143\u8fd0\u7b97\u7b26\u4e2d\u95f4\u90a3\u90e8\u5206\u3002\u8868\u8fbe\u5f0f expr1 ?: expr3 \u5728 expr1 \u6c42\u503c\u4e3a TRUE \u65f6\u8fd4\u56de expr1\uff0c\u5426\u5219\u8fd4\u56de expr3\u3002<\/p>\n<h2>\u6570\u7ec4<\/h2>\n<p>\u6570\u7ec4\u662f\u4e00\u4e2a\u80fd\u5728\u5355\u4e2a\u53d8\u91cf\u4e2d\u5b58\u50a8\u591a\u4e2a\u503c\u7684\u7279\u6b8a\u53d8\u91cf\u3002<\/p>\n<p>\u5982\u679c\u60a8\u6709\u4e00\u4e2a\u9879\u76ee\u6e05\u5355\uff08\u4f8b\u5982\uff1a\u8f66\u540d\u5b57\u7684\u6e05\u5355\uff09\uff0c\u5c06\u5176\u5b58\u50a8\u5230\u5355\u4e2a\u53d8\u91cf\u4e2d\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p>$cars1=&quot;Volvo&quot;;<br \/>\n$cars2=&quot;BMW&quot;;<br \/>\n$cars3=&quot;Toyota&quot;;<\/p>\n<p>\u7136\u800c\uff0c\u5982\u679c\u60a8\u60f3\u8981\u904d\u5386\u6570\u7ec4\u5e76\u627e\u51fa\u7279\u5b9a\u7684\u4e00\u4e2a\u5462\uff1f\u5982\u679c\u6570\u7ec4\u7684\u9879\u4e0d\u53ea 3 \u4e2a\u800c\u662f 300 \u4e2a\u5462\uff1f<\/p>\n<p>\u89e3\u51b3\u529e\u6cd5\u662f\u521b\u5efa\u4e00\u4e2a\u6570\u7ec4\uff01<\/p>\n<p>\u6570\u7ec4\u53ef\u4ee5\u5728\u5355\u4e2a\u53d8\u91cf\u4e2d\u5b58\u50a8\u591a\u4e2a\u503c\uff0c\u5e76\u4e14\u60a8\u53ef\u4ee5\u6839\u636e\u952e\u8bbf\u95ee\u5176\u4e2d\u7684\u503c\u3002<\/p>\n<p><strong>\u5728 PHP \u4e2d\u521b\u5efa\u6570\u7ec4<\/strong><\/p>\n<p>\u5728 PHP \u4e2d\uff0carray() \u51fd\u6570\u7528\u4e8e\u521b\u5efa\u6570\u7ec4\uff1a<\/p>\n<p>array();<\/p>\n<p>\u5728 PHP \u4e2d\uff0c\u6709\u4e09\u79cd\u7c7b\u578b\u7684\u6570\u7ec4\uff1a<\/p>\n<ul>\n<li><strong>\u6570\u503c\u6570\u7ec4<\/strong> - \u5e26\u6709\u6570\u5b57 ID \u952e\u7684\u6570\u7ec4<\/li>\n<li><strong>\u5173\u8054\u6570\u7ec4<\/strong> - \u5e26\u6709\u6307\u5b9a\u7684\u952e\u7684\u6570\u7ec4\uff0c\u6bcf\u4e2a\u952e\u5173\u8054\u4e00\u4e2a\u503c<\/li>\n<li><strong>\u591a\u7ef4\u6570\u7ec4<\/strong> - \u5305\u542b\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u7ec4\u7684\u6570\u7ec4<\/li>\n<\/ul>\n<h3>PHP \u6570\u503c\u6570\u7ec4<\/h3>\n<p>\u8fd9\u91cc\u6709\u4e24\u79cd\u521b\u5efa\u6570\u503c\u6570\u7ec4\u7684\u65b9\u6cd5\uff1a<\/p>\n<p>\u81ea\u52a8\u5206\u914d ID \u952e\uff08ID \u952e\u603b\u662f\u4ece 0 \u5f00\u59cb\uff09\uff1a<\/p>\n<p><code>$cars=array(&quot;Volvo&quot;,&quot;BMW&quot;,&quot;Toyota&quot;);<\/code><\/p>\n<p>\u4eba\u5de5\u5206\u914d ID \u952e\uff1a<\/p>\n<pre><code class=\"language-php\">$cars[0]=&quot;Volvo&quot;;\n$cars[1]=&quot;BMW&quot;;\n$cars[2]=&quot;Toyota&quot;;<\/code><\/pre>\n<p>\u4e0b\u9762\u7684\u5b9e\u4f8b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a $cars \u7684\u6570\u503c\u6570\u7ec4\uff0c\u5e76\u7ed9\u6570\u7ec4\u5206\u914d\u4e09\u4e2a\u5143\u7d20,\u7136\u540e\u6253\u5370\u4e00\u6bb5\u5305\u542b\u6570\u7ec4\u503c\u7684\u6587\u672c\uff1a<\/p>\n<pre><code class=\"language-php\">&lt;?php\n$cars=array(&quot;Volvo&quot;,&quot;BMW&quot;,&quot;Toyota&quot;);\necho &quot;I like &quot; . $cars[0] . &quot;, &quot; . $cars[1] . &quot; and &quot; . $cars[2] . &quot;.&quot;;\n?&gt;<\/code><\/pre>\n<h3>\u83b7\u53d6\u6570\u7ec4\u7684\u957f\u5ea6 - count() \u51fd\u6570<\/h3>\n<p>count() \u51fd\u6570\u7528\u4e8e\u8fd4\u56de\u6570\u7ec4\u7684\u957f\u5ea6\uff08\u5143\u7d20\u7684\u6570\u91cf\uff09\uff1a<\/p>\n<pre><code class=\"language-php\">&lt;?php\n$cars=array(&quot;Volvo&quot;,&quot;BMW&quot;,&quot;Toyota&quot;);\necho count($cars);\n?&gt;<\/code><\/pre>\n<h3>\u904d\u5386\u6570\u503c\u6570\u7ec4<\/h3>\n<p>\u904d\u5386\u5e76\u6253\u5370\u6570\u503c\u6570\u7ec4\u4e2d\u7684\u6240\u6709\u503c\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 for \u5faa\u73af\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre><code class=\"language-php\">&lt;?php\n$cars=array(&quot;Volvo&quot;,&quot;BMW&quot;,&quot;Toyota&quot;);\n$arrlength=count($cars);\n\nfor($x=0;$x&lt;$arrlength;$x++)\n{\n    echo $cars[$x];\n    echo &quot;&lt;br&gt;&quot;;\n}\n?&gt;<\/code><\/pre>\n<h3>PHP \u5173\u8054\u6570\u7ec4<\/h3>\n<p><strong>\u57fa\u672c\u4e0a\u7c7b\u4f3cPython\u5b57\u5178\u7684\u6982\u5ff5\u3002<\/strong><\/p>\n<p>\u5173\u8054\u6570\u7ec4\u662f\u4f7f\u7528\u60a8\u5206\u914d\u7ed9\u6570\u7ec4\u7684\u6307\u5b9a\u7684\u952e\u7684\u6570\u7ec4\u3002<\/p>\n<p>\u8fd9\u91cc\u6709\u4e24\u79cd\u521b\u5efa\u5173\u8054\u6570\u7ec4\u7684\u65b9\u6cd5\uff1a<\/p>\n<p><code>$age=array(&quot;Peter&quot;=&gt;&quot;35&quot;,&quot;Ben&quot;=&gt;&quot;37&quot;,&quot;Joe&quot;=&gt;&quot;43&quot;);<\/code><\/p>\n<p>or:<\/p>\n<pre><code class=\"language-php\">$age[&#039;Peter&#039;]=&quot;35&quot;;\n$age[&#039;Ben&#039;]=&quot;37&quot;;\n$age[&#039;Joe&#039;]=&quot;43&quot;;<\/code><\/pre>\n<p>\u968f\u540e\u53ef\u4ee5\u5728\u811a\u672c\u4e2d\u4f7f\u7528\u6307\u5b9a\u7684\u952e\uff1a<\/p>\n<pre><code class=\"language-php\">&lt;?php\n$age=array(&quot;Peter&quot;=&gt;&quot;35&quot;,&quot;Ben&quot;=&gt;&quot;37&quot;,&quot;Joe&quot;=&gt;&quot;43&quot;);\necho &quot;Peter is &quot; . $age[&#039;Peter&#039;] . &quot; years old.&quot;;\n?&gt;<\/code><\/pre>\n<h3>\u904d\u5386\u5173\u8054\u6570\u7ec4<\/h3>\n<p>\u904d\u5386\u5e76\u6253\u5370\u5173\u8054\u6570\u7ec4\u4e2d\u7684\u6240\u6709\u503c\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 foreach \u5faa\u73af\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre><code class=\"language-php\">&lt;?php\n$age=array(&quot;Peter&quot;=&gt;&quot;35&quot;,&quot;Ben&quot;=&gt;&quot;37&quot;,&quot;Joe&quot;=&gt;&quot;43&quot;);\n\nforeach($age as $x=&gt;$x_value)\n{\n    echo &quot;Key=&quot; . $x . &quot;, Value=&quot; . $x_value;\n    echo &quot;&lt;br&gt;&quot;;\n}\n?&gt;<\/code><\/pre>\n<p>\u8fd9\u6bb5\u7528Python\u7ffb\u8bd1\u5c31\u662f\uff1a<\/p>\n<pre><code class=\"language-python\">age = {\n    &quot;Peter&quot;: 35,\n    &quot;Ben&quot;:37,\n    &quot;Joe&quot;: 43\n}\nfor x, x_value in age.items():\n    print(&quot;Key=&quot;+ x +&quot;, Value=&quot; + y)\n    print(&quot;&lt;br&gt;&quot;)<\/code><\/pre>\n<h2>\u6570\u7ec4\u6392\u5e8f<\/h2>\n<p>\u6570\u7ec4\u4e2d\u7684\u5143\u7d20\u53ef\u4ee5\u6309\u5b57\u6bcd\u6216\u6570\u5b57\u987a\u5e8f\u8fdb\u884c\u964d\u5e8f\u6216\u5347\u5e8f\u6392\u5217\u3002<\/p>\n<p><strong>PHP - \u6570\u7ec4\u6392\u5e8f\u51fd\u6570<\/strong><\/p>\n<ul>\n<li>sort() - \u5bf9\u6570\u7ec4\u8fdb\u884c\u5347\u5e8f\u6392\u5217<\/li>\n<li>rsort() - \u5bf9\u6570\u7ec4\u8fdb\u884c\u964d\u5e8f\u6392\u5217<\/li>\n<li>asort() - \u6839\u636e\u5173\u8054\u6570\u7ec4\u7684\u503c\uff0c\u5bf9\u6570\u7ec4\u8fdb\u884c\u5347\u5e8f\u6392\u5217<\/li>\n<li>ksort() - \u6839\u636e\u5173\u8054\u6570\u7ec4\u7684\u952e\uff0c\u5bf9\u6570\u7ec4\u8fdb\u884c\u5347\u5e8f\u6392\u5217<\/li>\n<li>arsort() - \u6839\u636e\u5173\u8054\u6570\u7ec4\u7684\u503c\uff0c\u5bf9\u6570\u7ec4\u8fdb\u884c\u964d\u5e8f\u6392\u5217<\/li>\n<li>krsort() - \u6839\u636e\u5173\u8054\u6570\u7ec4\u7684\u952e\uff0c\u5bf9\u6570\u7ec4\u8fdb\u884c\u964d\u5e8f\u6392\u5217<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u57fa\u672c\u4e0a\u662f\u7167\u6284\u83dc\u9e1f\u6559\u7a0b\uff0c\u8be6\u60c5\u53ef\u89c1\uff1a https:\/\/www.runoob.com\/php\/php-tutorial.html PHP\u4ee3\u7801\u6807   \u2026 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[147],"tags":[149],"_links":{"self":[{"href":"\/index.php?rest_route=\/wp\/v2\/posts\/1970"}],"collection":[{"href":"\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1970"}],"version-history":[{"count":1,"href":"\/index.php?rest_route=\/wp\/v2\/posts\/1970\/revisions"}],"predecessor-version":[{"id":1971,"href":"\/index.php?rest_route=\/wp\/v2\/posts\/1970\/revisions\/1971"}],"wp:attachment":[{"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1970"},{"taxonomy":"post_tag","embeddable":true,"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}