{"id":30112,"date":"2023-04-21T15:55:49","date_gmt":"2023-12-06T00:33:52","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/"},"modified":"2025-08-12T17:37:25","modified_gmt":"2025-08-12T09:37:25","slug":"%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/","title":{"rendered":"\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72->php73\uff09"},"content":{"rendered":"<p>\u8003\u8651\u5230php7.2\u7684\u5b89\u5168\u652f\u6301\u5df2\u5230\u671f\uff0c\u9700\u8981\u5347\u7ea7php\u7684\u65b9\u6cd5\u3002\u7531\u4e8ephp7.3\u7684\u5b89\u5168\u652f\u6301\u4e5f\u5373\u5c06\u5230\u671f\uff0c\u56e0\u6b64\u5c06\u6b64\u8bb0\u5f55\u4f5c\u4e3a\u5907\u5fd8\u5f55\u53d1\u5e03\u3002<\/p>\n<h1>\u672c\u6587\u6240\u63d0\u5230\u7684\u73af\u5883<\/h1>\n<p>\u4e3b\u673a\u64cd\u4f5c\u7cfb\u7edf\uff1aWindows 10<br \/>\n\u865a\u62df\u673a\u64cd\u4f5c\u7cfb\u7edf\uff1aCentOS 7<br \/>\n\u865a\u62df\u673a\u8f6f\u4ef6\uff1aVirtualBox + Vagrant<br \/>\nepel\u8f6f\u4ef6\u6e90<br \/>\nremi\u8f6f\u4ef6\u6e90<br \/>\nTera Term<br \/>\nphp7.2<\/p>\n<h1>\u5347\u7ea7\u65b9\u6cd5<\/h1>\n<p>\u30db\u30b9\u30c8OS\u304b\u3089\u30b2\u30b9\u30c8OS\u3092\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<p>cd [vagrant\u30db\u30fc\u30e0]<br \/>\nvagrant up<\/p>\n<p>\u30b2\u30b9\u30c8OS\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081Tera Term\u3092\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bphp\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<p>php -v<br \/>\nyum list installed php*<\/p>\n<p>\u4e00\u65e6php\u3092\u524a\u9664\u3059\u308b\u305f\u3081\u3001\u5fc5\u8981\u306a\u3089php.ini\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u3068\u308b\u3002<\/p>\n<p>find \/ -name php.ini -ls<br \/>\ncp -p [\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3059\u308bphp.ini] [\u4efb\u610f\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u5148]<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bphp\u3092\u524a\u9664\u3059\u308b<\/p>\n<p>yum remove php*<\/p>\n<p>epel-release\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3002<\/p>\n<p>yum update epel-release<\/p>\n<p>remi\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<p>ll \/etc\/yum.repos.d\/ | grep remi-<\/p>\n<p>remi-php73.repo\u304c\u306a\u3044\u5834\u5408\u306f\u4ee5\u4e0b\u3092\u5b9f\u65bd\u3059\u308b\u3002<\/p>\n<p>yum install http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm<\/p>\n<p>php7.3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<p>yum -y install &#8211;enablerepo=epel,remi,remi-php73 php php-cli php-common php-gd php-imap php-mbstring php-mysql php-odbc php-pdo php-pear php-pgsql php-process php-snmp php-xml php-xmlrpc php-fpm php-mcrypt php-devel php-apcu php-psr php-sodium<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fphp\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<p>php -v<\/p>\n<p>apache\u3092\u518d\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<p>systemctl restart httpd<\/p>\n<p>\u80fd\u5426\u6309\u7167\u540c\u6837\u7684\u65b9\u6cd5\u5c06PHP 73\u5347\u7ea7\u5230PHP 74\u5462\uff1f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8003\u8651\u5230php7.2\u7684\u5b89\u5168\u652f\u6301\u5df2\u5230\u671f\uff0c\u9700\u8981\u5347\u7ea7php\u7684\u65b9\u6cd5\u3002\u7531\u4e8ephp7.3\u7684\u5b89\u5168\u652f\u6301\u4e5f\u5373\u5c06\u5230\u671f\uff0c\u56e0\u6b64\u5c06\u6b64\u8bb0\u5f55\u4f5c [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-30112","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72-&gt;php73\uff09 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72-&gt;php73\uff09\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5347\u7ea7php\u7684\u65b9\u6cd5\uff08php72-php73\uff09\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72-&gt;php73\uff09\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72-&gt;php73\uff09\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5347\u7ea7php\u7684\u65b9\u6cd5\uff08php72-php73\uff09\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-06T00:33:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-12T09:37:25+00:00\" \/>\n<meta name=\"author\" content=\"\u65b0, \u97f5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u65b0, \u97f5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/\",\"name\":\"\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72->php73\uff09 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-12-06T00:33:52+00:00\",\"dateModified\":\"2025-08-12T09:37:25+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\"},\"description\":\"\u5173\u4e8e\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72->php73\uff09\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72->php73\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\",\"name\":\"\u65b0, \u97f5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"caption\":\"\u65b0, \u97f5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72->php73\uff09 - Blog - Silicon Cloud","description":"\u5173\u4e8e\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72->php73\uff09\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5347\u7ea7php\u7684\u65b9\u6cd5\uff08php72-php73\uff09\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72->php73\uff09","og_description":"\u5173\u4e8e\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72->php73\uff09\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5347\u7ea7php\u7684\u65b9\u6cd5\uff08php72-php73\uff09\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-12-06T00:33:52+00:00","article_modified_time":"2025-08-12T09:37:25+00:00","author":"\u65b0, \u97f5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u65b0, \u97f5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/","name":"\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72->php73\uff09 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-12-06T00:33:52+00:00","dateModified":"2025-08-12T09:37:25+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9"},"description":"\u5173\u4e8e\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72->php73\uff09\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5347\u7ea7PHP\u7684\u65b9\u6cd5\uff08php72->php73\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9","name":"\u65b0, \u97f5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","caption":"\u65b0, \u97f5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%8d%87%e7%ba%a7php%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%88php72-php73%ef%bc%89\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=30112"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30112\/revisions"}],"predecessor-version":[{"id":88607,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30112\/revisions\/88607"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=30112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=30112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=30112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}