{"id":615,"date":"2025-06-11T10:59:55","date_gmt":"2025-06-11T02:59:55","guid":{"rendered":"https:\/\/www.zhaozhao123.cn\/php\/php-application-manual\/sjjg\/615.html"},"modified":"2025-06-11T10:59:55","modified_gmt":"2025-06-11T02:59:55","slug":"fixing-php-%e4%b8%a5%e6%a0%bc%e6%a0%87%e5%87%86%ef%bc%9a%e6%96%b9%e6%b3%95%e5%a3%b0%e6%98%8e%e5%ba%94%e8%af%a5%e5%85%bc%e5%ae%b9","status":"publish","type":"my1js","link":"https:\/\/www.zhaozhao123.cn\/php\/my1js\/615.html","title":{"rendered":"Fixing PHP \u4e25\u683c\u6807\u51c6\uff1a\u65b9\u6cd5\u58f0\u660e\u5e94\u8be5\u517c\u5bb9"},"content":{"rendered":"<div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--1\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/dyA-1-400x300.jpg\" alt=\"Bug&#32534;&#35793;&#29422;\" class=\"wp-image-1842\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading my-0\" style=\"font-size:clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.175), 1rem);\">Bug&#32534;&#35793;&#29422;<\/h2>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<p>PHP &#20005;&#26684;&#26631;&#20934;&#65288;Strict Standards&#65289;&#26159; PHP &#25552;&#20379;&#30340;&#19968;&#31181;&#23433;&#20840;&#26426;&#21046;&#65292;&#26088;&#22312;&#38450;&#27490;&#19981;&#23433;&#20840;&#30340;&#20195;&#30721;&#25191;&#34892;&#12290;&#36890;&#36807;&#21551;&#29992;&#20005;&#26684;&#26631;&#20934;&#65292;PHP &#20250;&#21457;&#20986;&#35686;&#21578;&#21644;&#38169;&#35823;&#20449;&#24687;&#65292;&#20197;&#24110;&#21161;&#24320;&#21457;&#32773;&#21457;&#29616;&#28508;&#22312;&#30340;&#23433;&#20840;&#38382;&#39064;&#12290;&#28982;&#32780;&#65292;&#26377;&#26102;&#65292;PHP &#30340;&#20005;&#26684;&#26631;&#20934;&#21487;&#33021;&#20250;&#23548;&#33268;&#19968;&#20123;&#19981;&#24517;&#35201;&#30340;&#35686;&#21578;&#65292;&#29305;&#21035;&#26159;&#22312;&#20351;&#29992;&#33258;&#23450;&#20041;&#20989;&#25968;&#25110;&#31867;&#26102;&#12290;<\/p>\n<h3>&#26041;&#27861;&#22768;&#26126;&#20860;&#23481;&#24615;<\/h3>\n<p>&#20026;&#20102;&#30830;&#20445;&#26041;&#27861;&#22768;&#26126;&#19982;&#23454;&#38469;&#23454;&#29616;&#19968;&#33268;&#65292;PHP &#24341;&#20837;&#20102; <code>@<\/code> &#31526;&#21495;&#26469;&#24573;&#30053;&#29305;&#23450;&#30340;&#35686;&#21578;&#12290;&#20363;&#22914;&#65292;&#22914;&#26524;&#20320;&#24819;&#24573;&#30053;&#26576;&#20010;&#29305;&#23450;&#30340;&#35686;&#21578;&#65292;&#21487;&#20197;&#22312;&#26041;&#27861;&#22768;&#26126;&#21069;&#28155;&#21152; <code>@<\/code> &#31526;&#21495;&#12290;<\/p>\n<h4>&#31034;&#20363;&#20195;&#30721;<\/h4>\n<pre><code class=\"language-php\">\/\/ &#31034;&#20363;&#31867;\nclass MyClass {\n    \/\/ &#23450;&#20041;&#19968;&#20010;&#26041;&#27861;&#65292;&#24573;&#30053; E_STRICT &#35686;&#21578;\n    public function myMethod() {\n        @echo \"Hello, World!\";\n    }\n}\n\n\/\/ &#21019;&#24314;&#23454;&#20363;&#24182;&#35843;&#29992;&#26041;&#27861;\n$obj = new MyClass();\n$obj-&gt;myMethod();<\/code><\/pre>\n<p>&#22312;&#36825;&#20010;&#20363;&#23376;&#20013;&#65292;<code>@echo \"Hello, World!\"<\/code> &#20351;&#29992;&#20102; <code>@<\/code> &#31526;&#21495;&#26469;&#24573;&#30053; <code>E_STRICT<\/code> &#35686;&#21578;&#65292;&#22240;&#20026;&#36825;&#20010;&#35686;&#21578;&#26159;&#30001;&#20110;&#20351;&#29992;&#20102; <code>@<\/code> &#31526;&#21495;&#32780;&#20135;&#29983;&#30340;&#12290;<\/p>\n<h3>&#27880;&#24847;&#20107;&#39033;<\/h3>\n<ol>\n<li><strong>&#35880;&#24910;&#20351;&#29992;<\/strong>&#65306;&#34429;&#28982;&#21487;&#20197;&#20351;&#29992; <code>@<\/code> &#31526;&#21495;&#26469;&#24573;&#30053;&#26576;&#20123;&#35686;&#21578;&#65292;&#20294;&#36807;&#24230;&#20351;&#29992;&#21487;&#33021;&#20250;&#25513;&#30422;&#28508;&#22312;&#30340;&#38382;&#39064;&#12290;&#22240;&#27492;&#65292;&#24314;&#35758;&#22312;&#29983;&#20135;&#29615;&#22659;&#20013;&#35880;&#24910;&#20351;&#29992;&#12290;<\/li>\n<li><strong>&#35843;&#35797;<\/strong>&#65306;&#22914;&#26524;&#38656;&#35201;&#35299;&#20915;&#29305;&#23450;&#30340;&#35686;&#21578;&#65292;&#21487;&#20197;&#25163;&#21160;&#26816;&#26597;&#20195;&#30721;&#65292;&#25214;&#20986;&#28508;&#22312;&#30340;&#38382;&#39064;&#25152;&#22312;&#65292;&#24182;&#37319;&#21462;&#30456;&#24212;&#30340;&#25514;&#26045;&#12290;<\/li>\n<li><strong>&#25991;&#26723;<\/strong>&#65306;&#38405;&#35835; PHP &#30340;&#23448;&#26041;&#25991;&#26723;&#21644;&#30456;&#20851;&#25945;&#31243;&#65292;&#20102;&#35299;&#22914;&#20309;&#27491;&#30830;&#22320;&#22788;&#29702;&#21644;&#36991;&#20813;&#36825;&#20123;&#35686;&#21578;&#12290;<\/li>\n<\/ol>\n<p>&#36890;&#36807;&#21512;&#29702;&#20351;&#29992; <code>@<\/code> &#31526;&#21495;&#65292;&#21487;&#20197;&#26377;&#25928;&#22320;&#25552;&#39640; PHP &#31243;&#24207;&#30340;&#36136;&#37327;&#21644;&#23433;&#20840;&#24615;&#12290;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div><div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--2\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/zp-400x300.jpg\" alt=\"&#40657;&#26495;Bug&#35762;&#24072;\" class=\"wp-image-1849\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading my-0\" style=\"font-size:clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.175), 1rem);\">&#40657;&#26495;Bug&#35762;&#24072;<\/h2>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<body><h2>&#27010;&#35272;<\/h2><p>&#22312;PHP&#20013;&#65292;&#20005;&#26684;&#26631;&#20934;&#65288;Strict Standards&#65289;&#30340;&#35774;&#35745;&#26159;&#20026;&#20102;&#30830;&#20445;&#20195;&#30721;&#36136;&#37327;&#21644;&#20860;&#23481;&#24615;&#12290;&#24403;&#26041;&#27861;&#22768;&#26126;&#19982;&#29238;&#31867;&#25110;&#25509;&#21475;&#19981;&#19968;&#33268;&#26102;&#65292;&#20250;&#36935;&#21040;&ldquo;Strict Standards&rdquo;&#38169;&#35823;&#12290;&#25484;&#25569;&#36825;&#20123;&#26631;&#20934;&#23545;&#20110;&#26500;&#24314;&#31283;&#20581;&#19988;&#26131;&#20110;&#21319;&#32423;&#30340;&#24212;&#29992;&#31243;&#24207;&#33267;&#20851;&#37325;&#35201;&#12290;<\/p><h2>&#24341;&#21457;&#38169;&#35823;&#30340;&#21407;&#22240;&#26159;&#20160;&#20040;&#65311;<\/h2><p>&#22312;&#28145;&#20837;&#20855;&#20307;&#35299;&#20915;&#26041;&#26696;&#20043;&#21069;&#65292;&#29702;&#35299;&#36825;&#20010;&#38169;&#35823;&#30340;&#21407;&#22240;&#38750;&#24120;&#37325;&#35201;&#12290;&#20174;&#26681;&#26412;&#19978;&#35762;&#65292;&#23427;&#21457;&#29983;&#22312;&#23376;&#31867;&#20013;&#30340;&#26041;&#27861;&#25110;&#25509;&#21475;&#30340;&#23454;&#29616;&#19982;&#29238;&#31867;&#25110;&#25509;&#21475;&#20013;&#23545;&#24212;&#30340;&#26041;&#27861;&#31614;&#21517;&#19981;&#21305;&#37197;&#26102;&#12290;&#31614;&#21517;&#21253;&#25324;&#26041;&#27861;&#30340;&#21517;&#23383;&#12289;&#21442;&#25968;&#30340;&#25968;&#37327;&#21644;&#31867;&#22411;&#20197;&#21450;&#36820;&#22238;&#20540;&#30340;&#31867;&#22411;&#12290;<\/p><h3>&#31614;&#21517;&#19981;&#19968;&#33268;&#30340;&#24773;&#20917;&#31034;&#20363;&#12290;<\/h3><pre><code>\ninterface ShapeInterface {\n    public function draw($color, $size);\n}\n\nclass Circle implements ShapeInterface {\n    public function draw($color) { \/\/ Error\n        \/\/ Circle-specific drawing logic\n    }\n}\n<\/code><\/pre><p>&#22312;&#19978;&#36848;&#20363;&#23376;&#20013;&#65292;<code>draw<\/code>&#26041;&#27861;&#22312;&#37027;&#20799;&#20102;<code>Circle<\/code>&#31867;&#31614;&#21517;&#19982;&#25351;&#23450;&#30340;&#31614;&#21517;&#19981;&#21305;&#37197;&#12290;<code>ShapeInterface<\/code>&#23548;&#33268;&#20102;&#19968;&#20010;&#20005;&#37325;&#30340;&#38169;&#35823;&#65292;&#21363;&ldquo;Strict Standards&rdquo;&#35686;&#21578;&#12290;<\/p><h2>&#35843;&#25972;&#26041;&#27861;&#31614;&#21517;<\/h2><p>&#35201;&#35299;&#20915;&#27492;&#38169;&#35823;&#65292;&#23376;&#31867;&#20013;&#30340;&#26041;&#27861;&#31614;&#21517;&#25110;&#25509;&#21475;&#23454;&#29616;&#24517;&#39035;&#19982;&#29238;&#31867;&#25110;&#25509;&#21475;&#30340;&#31614;&#21517;&#23436;&#20840;&#21305;&#37197;&#12290;<\/p><h3>&#32416;&#27491;&#30340;&#31614;&#21517;&#31034;&#20363;<\/h3><pre><code>\n\/\/ Corrected interface implementation\nclass Circle implements ShapeInterface {\n    public function draw($color, $size) {\n        \/\/ Circle-specific drawing logic\n    }\n}\n<\/code><\/pre><p>&#24403;&#26041;&#27861;&#31614;&#21517;&#21305;&#37197;&#21518;&#65292;&#23558;&#20250;&#36991;&#20813;&#35302;&#21457;&ldquo;Strict Standards&rdquo;&#38169;&#35823;&#12290;<\/p><h2>&#22788;&#29702;&#21487;&#36873;&#21442;&#25968;<\/h2><p>&#22312;&#22788;&#29702;&#21487;&#36873;&#21442;&#25968;&#26102;&#65292;&#38382;&#39064;&#24120;&#24120;&#20986;&#29616;&#12290;&#23613;&#31649;&#21442;&#25968;&#30340;&#39034;&#24207;&#21644;&#24517;&#38656;&#21442;&#25968;&#30340;&#25968;&#37327;&#24517;&#39035;&#21305;&#37197;&#65292;&#20294;&#21487;&#36873;&#21442;&#25968;&#21487;&#20197;&#26377;&#25152;&#19981;&#21516;&#65292;&#21482;&#35201;&#23427;&#20204;&#19981;&#20250;&#24341;&#20837;&#19981;&#20860;&#23481;&#24615;&#21363;&#21487;&#12290;<\/p><h3>&#24102;&#26377;&#21487;&#36873;&#21442;&#25968;&#30340;&#31034;&#20363;<\/h3><pre><code>\n\/\/ Updated interface with an optional parameter\nclass Circle implements ShapeInterface {\n    public function draw($color, $size, $border = 'solid') {\n        \/\/ Circle logic with optional border style\n    }\n}\n<\/code><\/pre><p>&#22312;&#36825;&#31181;&#24773;&#20917;&#19979;&#65292;&#22914;&#26524;&#21442;&#25968;&#30340;&#22768;&#26126;&#19982;&#25509;&#21475;&#19968;&#33268;&#65292;&#37027;&#20040;&#28155;&#21152;&#21487;&#36873;&#21442;&#25968;&#24182;&#19981;&#20250;&#24341;&#21457;&#38382;&#39064;&#12290;<\/p><h2>&#31867;&#22411;&#25552;&#31034;&#21644;&#36820;&#22238;&#31867;&#22411;<\/h2><p>&#31867;&#22411;&#25552;&#31034;&#21644;&#36820;&#22238;&#31867;&#22411;&#20063;&#26159;&#26041;&#27861;&#31614;&#21517;&#30340;&#19968;&#37096;&#20998;&#12290;&#30830;&#20445;&#36825;&#20123;&#21305;&#37197;&#26159;&#36981;&#24490;&#20005;&#26684;&#26631;&#20934;&#25152;&#24517;&#38656;&#30340;&#12290;<\/p><h3>&#31034;&#20363;&#65292;&#24102;&#26377;&#31867;&#22411;&#25552;&#31034;<\/h3><pre><code>\ninterface ShapeInterface {\n    public function draw(string $color, int $size):\n    ShapeInterface;\n}\n\nclass Circle implements ShapeInterface {\n    public function draw(string $color, int $size):\n    ShapeInterface {\n        \/\/ Drawing logic\n        return $this;\n    }\n}\n<\/code><\/pre><p>&#36825;&#37324;&#20351;&#29992;&#21305;&#37197;&#30340;&#21442;&#25968;&#21644;&#36820;&#22238;&#31867;&#22411;&#22768;&#26126;&#26469;&#28385;&#36275;&#20005;&#26684;&#30340;&#35201;&#27714;&#12290;<\/p><h2>&#32487;&#25215;&#26500;&#36896;&#22120;&#31614;&#21517;<\/h2><p>PHP&#31867;&#30340;&#26500;&#36896;&#20989;&#25968;&#65292;&#23601;&#20687;&#20854;&#20182;&#26041;&#27861;&#19968;&#26679;&#65292;&#20063;&#38656;&#35201;&#36981;&#23432;&#20860;&#23481;&#24615;&#35268;&#21017;&#12290;&#19968;&#20010;&#24120;&#35265;&#30340;&#38519;&#38449;&#26159;&#22312;&#32487;&#25215;&#31867;&#26102;&#25913;&#21464;&#26500;&#36896;&#20989;&#25968;&#21442;&#25968;&#12290;<\/p><h3>&#26500;&#36896;&#22120;&#31614;&#21517;&#19981;&#21305;&#37197;&#31034;&#20363;<\/h3><pre><code>\nclass Shape {\n    public function __construct($color) { ... }\n}\n\nclass Circle extends Shape {\n    public function __construct($color, $size) { ... } \/\/ Error\n}\n<\/code><\/pre><p>&#36825;&#20010;&#19981;&#19968;&#33268;&#30340;&#26500;&#36896;&#22120;&#20250;&#23548;&#33268;&ldquo;Strict Standards&rdquo;&#38169;&#35823;&#65292;&#22240;&#20026;&#31614;&#21517;&#24182;&#19981;&#21305;&#37197;&#12290;<\/p><h3>&#32416;&#27491;&#30340;&#26500;&#36896;&#22120;&#31034;&#20363;<\/h3><pre><code>\n\/\/ A constructor that properly extends the parent's\nclass Circle extends Shape {\n    public function __construct($color, $size = null) {\n        parent::__construct($color);\n        \/\/ Circle-specific construction logic\n    }\n}\n<\/code><\/pre><p>&#20462;&#27491;&#30340;&#26500;&#36896;&#22120;&#30830;&#20445;&#20860;&#23481;&#24615;&#65292;&#36890;&#36807;&#25193;&#23637;&#29238;&#31867;&#30340;&#31614;&#21517;&#65292;&#24182;&#22312;&#24517;&#35201;&#26102;&#21253;&#25324;&#39069;&#22806;&#21442;&#25968;&#20316;&#20026;&#21487;&#36873;&#21442;&#25968;&#12290;<\/p><h2>&#39640;&#32423;&#32487;&#25215;&#21644;&#25509;&#21475;<\/h2><p>&#39640;&#32423;&#26696;&#20363;&#21487;&#33021;&#28041;&#21450;&#22797;&#26434;&#30340;&#23618;&#27425;&#32467;&#26500;&#25110;&#22810;&#20010;&#25509;&#21475;&#12290;&#21363;&#20351;&#22312;&#36825;&#31181;&#24773;&#20917;&#19979;&#65292;&#27599;&#20010;&#31867;&#25110;&#25509;&#21475;&#20063;&#24517;&#39035;&#20180;&#32454;&#36981;&#23432;&#20005;&#26684;&#30340;&#31867;&#22411;&#21644;&#31614;&#21517;&#32422;&#23450;&#65292;&#20197;&#20445;&#25345;PHP&#30340;&#39044;&#27979;&#24615;&#21644;&#21487;&#38752;&#24615;&#65292;&#20174;&#32780;&#22312;&#23545;&#35937;&#20132;&#20114;&#20013;&#32500;&#25252;&#20854;&#21512;&#21516;&#12290;<\/p><p>&#22797;&#26434;&#32487;&#25215;&#24773;&#20917;&#19981;&#20165;&#38656;&#35201;&#21305;&#37197;&#31614;&#21517;&#65292;&#36824;&#38656;&#35201;&#23545;&#31867;&#23618;&#27425;&#32467;&#26500;&#26377;&#28145;&#20837;&#30340;&#29702;&#35299;&#20197;&#21450;&#27599;&#20010;&#26041;&#27861;&#30340;&#30446;&#30340;&#26377;&#28145;&#21051;&#30340;&#35748;&#35782;&#12290;<\/p><h2>&#32467;&#35770;&#12290;<\/h2><p>&#22312;PHP&#30340;&#20005;&#26684;&#26631;&#20934;&#23548;&#33322;&#20013;&#65292;&#36215;&#21021;&#21487;&#33021;&#30475;&#36215;&#26469;&#26377;&#20123;&#22256;&#38590;&#65292;&#20294;&#23427;&#20204;&#30830;&#31435;&#20102;&#33391;&#22909;&#30340;&#23454;&#36341;&#65292;&#20174;&#32780;&#20419;&#36827;&#20102;&#26356;&#21487;&#38752;&#21644;&#21487;&#32500;&#25252;&#30340;&#20195;&#30721;&#12290;&#36890;&#36807;&#36981;&#24490;&#26041;&#27861;&#20860;&#23481;&#24615;&#24182;&#29702;&#35299;&#26041;&#27861;&#31614;&#21517;&#22914;&#20309;&#36890;&#36807;&#32487;&#25215;&#21644;&#25509;&#21475;&#23454;&#29616;&#20256;&#25773;&#65292;&#24744;&#21487;&#20197;&#36991;&#20813;&#24120;&#35265;&#30340;&#20005;&#26684;&#26631;&#20934;&#38519;&#38449;&#65292;&#24182;&#21019;&#20316;&#20986;&#21331;&#36234;&#30340;PHP&#24212;&#29992;&#31243;&#24207;&#12290;<\/p><\/body>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div><div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--3\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/xygcfznnzczhsdmwydzhsmzzzmddnq-400x300.jpg\" alt=\"&#38271;&#24037;&#30721;&#22900;1523\" class=\"wp-image-2906\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading my-0\" style=\"font-size:clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.175), 1rem);\">&#38271;&#24037;&#30721;&#22900;1523<\/h2>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<p>&#22312;PHP&#20013;&#65292;&#36981;&#24490;&#20005;&#26684;&#30340;&#21629;&#21517;&#32422;&#23450;&#26159;&#38750;&#24120;&#37325;&#35201;&#30340;&#12290;&#26041;&#27861;&#22768;&#26126;&#65288;&#20989;&#25968;&#23450;&#20041;&#65289;&#24212;&#35813;&#25353;&#29031;&#35268;&#33539;&#36827;&#34892;&#32534;&#20889;&#65292;&#20197;&#20415;&#20110;&#20854;&#20182;&#24320;&#21457;&#32773;&#29702;&#35299;&#21644;&#20351;&#29992;&#12290;&#20197;&#19979;&#26159;&#19968;&#20123;&#20851;&#20110;&#22914;&#20309;&#36981;&#23432;&#20005;&#26684;&#21629;&#21517;&#32422;&#23450;&#30340;&#25351;&#23548;&#21407;&#21017;&#65306;<\/p>\n<ol>\n<li>\n<p><strong>&#20445;&#25345;&#19968;&#33268;&#24615;<\/strong>&#65306;&#30830;&#20445;&#25152;&#26377;&#26041;&#27861;&#21517;&#37117;&#20855;&#26377;&#30456;&#21516;&#30340;&#21069;&#32512;&#65292;&#20363;&#22914;<code>get<\/code>, <code>post<\/code>, <code>put<\/code>, &#25110;&#32773;<code>delete<\/code>&#31561;&#12290;<\/p>\n<\/li>\n<li>\n<p><strong>&#36991;&#20813;&#20351;&#29992;&#32553;&#20889;<\/strong>&#65306;&#38500;&#38750;&#26377;&#29305;&#27530;&#30340;&#21407;&#22240;&#65292;&#22914;&#20026;&#20102;&#26041;&#20415;&#35760;&#24518;&#65292;&#23613;&#37327;&#36991;&#20813;&#20351;&#29992;&#32553;&#20889;&#65292;&#22914;<code>$_GET<\/code> &#32780;&#19981;&#26159;<code>$query<\/code>&#12290;<\/p>\n<\/li>\n<li>\n<p><strong>&#20351;&#29992;&#22823;&#20889;&#39318;&#23383;&#27597;<\/strong>&#65306;&#22312;PHP&#20013;&#65292;&#22823;&#22810;&#25968;&#26041;&#27861;&#21644;&#21464;&#37327;&#21517;&#31216;&#37117;&#24212;&#35813;&#20351;&#29992;&#22823;&#20889;&#23383;&#27597;&#24320;&#22836;&#65292;&#36825;&#26377;&#21161;&#20110;&#25552;&#39640;&#20195;&#30721;&#30340;&#21487;&#35835;&#24615;&#21644;&#19968;&#33268;&#24615;&#12290;<\/p>\n<\/li>\n<li>\n<p><strong>&#36991;&#20813;&#20351;&#29992;&#30701;&#35821;&#25110;&#21160;&#35789;<\/strong>&#65306;&#36991;&#20813;&#20351;&#29992;&#35832;&#22914;&ldquo;add&rdquo;&#12289;&ldquo;create&rdquo;&#36825;&#26679;&#30340;&#30701;&#35821;&#25110;&#21160;&#35789;&#20316;&#20026;&#26041;&#27861;&#21517;&#65292;&#22240;&#20026;&#23427;&#20204;&#21487;&#33021;&#20250;&#28151;&#28102;&#12290;<\/p>\n<\/li>\n<li>\n<p><strong>&#32771;&#34385;&#20351;&#29992;&#39548;&#23792;&#24335;&#21629;&#21517;&#27861;<\/strong>&#65306;&#23545;&#20110;&#37027;&#20123;&#38656;&#35201;&#21306;&#20998;&#22823;&#23567;&#20889;&#30340;&#23383;&#27573;&#21517;&#65292;&#21487;&#20197;&#20351;&#29992;&#39548;&#23792;&#24335;&#21629;&#21517;&#27861;&#26469;&#34920;&#31034;&#65292;&#21363;&#27599;&#20010;&#21333;&#35789;&#30340;&#31532;&#19968;&#20010;&#23383;&#31526;&#23567;&#20889;&#65292;&#20854;&#20313;&#23383;&#31526;&#22823;&#20889;&#12290;<\/p>\n<\/li>\n<li>\n<p><strong>&#36981;&#24490;PECL&#21629;&#21517;&#35268;&#21017;<\/strong>&#65306;&#22914;&#26524;&#20351;&#29992;&#20102;PECL&#25193;&#23637;&#65292;&#21017;&#24212;&#36981;&#24490;PECL&#30340;&#21629;&#21517;&#32422;&#23450;&#65292;&#20363;&#22914;&#20351;&#29992;<code>__construct<\/code>&#32780;&#19981;&#26159;<code>__init__<\/code>&#12290;<\/p>\n<\/li>\n<\/ol>\n<p>&#19979;&#38754;&#26159;&#19968;&#20010;&#20363;&#23376;&#65292;&#23637;&#31034;&#22914;&#20309;&#36981;&#24490;&#19978;&#36848;&#24314;&#35758;&#65306;<\/p>\n<pre><code class=\"language-php\">\/**\n * This function demonstrates how to use the `__construct`\n * method in a class.\n *\/\nclass MyClass {\n    private $property;\n\n    \/**\n     * Constructor method for MyClass\n     *\/\n    public function __construct() {\n        \/\/ Initialization code here...\n    }\n}<\/code><\/pre>\n<p>&#22312;&#36825;&#20010;&#20363;&#23376;&#20013;&#65292;&#25105;&#20204;&#36981;&#24490;&#20102;&#20197;&#19979;&#35268;&#21017;&#65306;<\/p>\n<ul>\n<li>&#26041;&#27861;&#21517;<code>__construct<\/code>&#26159;&#31526;&#21512;PHP&#21629;&#21517;&#32422;&#23450;&#30340;&#12290;<\/li>\n<li>&#20351;&#29992;&#20102;&#22823;&#20889;&#23383;&#27597;&#24320;&#22836;&#30340;&#26041;&#27861;&#21517;&#65292;&#31526;&#21512;PECL&#21629;&#21517;&#32422;&#23450;&#12290;<\/li>\n<li>&#31867;&#20013;&#30340;<code>__construct<\/code>&#26041;&#27861;&#27809;&#26377;&#20351;&#29992;&#32553;&#20889;&#65292;&#20063;&#27809;&#26377;&#20351;&#29992;&#21160;&#35789;&#24418;&#24335;&#12290;<\/li>\n<\/ul>\n<p>&#36890;&#36807;&#36981;&#24490;&#36825;&#20123;&#35268;&#21017;&#65292;&#25105;&#20204;&#21487;&#20197;&#30830;&#20445;&#25105;&#20204;&#30340;&#20195;&#30721;&#26356;&#26131;&#20110;&#29702;&#35299;&#65292;&#24182;&#19988;&#19982;&#20854;&#20182;&#24320;&#21457;&#32773;&#20849;&#20139;&#26102;&#26356;&#21152;&#23481;&#26131;&#12290;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Bug&#32534;&#35793;&#29422; PHP &#20005;&#26684;&#26631;&#20934;&#65288;Strict Standards&#65289;&#26159; PHP &#25552;&#20379;&#30340;&#19968;&#31181;&#23433;&#038;#2..<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"template":"","meta":{"_acf_changed":false},"tags":[],"my1js2nav":[41],"tuisongtax":[],"class_list":["post-615","my1js","type-my1js","status-publish","hentry","my1js2nav-sjjg"],"acf":{"qian_art_seotitle":"","qian_art_seotitle_source":{"label":"SEO\u6807\u9898","type":"text","formatted_value":""},"qian_art_seokws":"","qian_art_seokws_source":{"label":"SEO\u5173\u952e\u8bcd","type":"text","formatted_value":""},"qian_art_stzhong":"","qian_art_stzhong_source":{"label":"\u4e2d | \u77ed\u6807\u9898","type":"text","formatted_value":""}},"_links":{"self":[{"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/my1js\/615","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/my1js"}],"about":[{"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/types\/my1js"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/users\/1"}],"wp:attachment":[{"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/media?parent=615"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/tags?post=615"},{"taxonomy":"my1js2nav","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/my1js2nav?post=615"},{"taxonomy":"tuisongtax","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/tuisongtax?post=615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}