自动安装PHP+composer环境

如果你的是Linux或MacOS系统,可以使用以下命令快速安装PHP+Composer环境,PHP包含了绝大多数常用扩展。

手动下载PHP

# 文件 大小
0 php-8.3-windows-x86_64.tar.gz 9.38M
1 php-8.3-mac-x86_64.tar.gz 12.57M
2 php-8.3-mac-aarch64.tar.gz 12.41M
3 php-8.3-linux-x86_64.tar.gz 13.84M
4 php-8.3-linux-aarch64.tar.gz 14.5M
5 php-8.2-windows-x86_64.tar.gz 9.29M
6 php-8.2-mac-x86_64.tar.gz 12.49M
7 php-8.2-mac-aarch64.tar.gz 12.32M
8 php-8.2-linux-x86_64.tar.gz 13.76M
9 php-8.2-linux-aarch64.tar.gz 14.41M
10 php-8.1-windows-x86_64.tar.gz 9.16M
11 php-8.1-mac-x86_64.tar.gz 12.38M
12 php-8.1-mac-aarch64.tar.gz 12.22M
13 php-8.1-linux-x86_64.tar.gz 13.65M
14 php-8.1-linux-aarch64.tar.gz 14.3M
15 php-8.0-windows-x86_64.tar.gz 9.09M
16 php-8.0-mac-x86_64.tar.gz 12.33M
17 php-8.0-mac-aarch64.tar.gz 11.75M
18 php-8.0-linux-x86_64.tar.gz 13.6M

配置cert.pem

使用curl、pgsql等请求HTTPS网站或建立SSL连接时,可能有 error:80000002:system library::No such file or directory 错误,请参考如下命令配置cert.pem文件。
Linux/MacOS系统
sudo mkdir -p /etc/ssl/certs && sudo  curl -o /etc/ssl/certs/ca-certificates.crt https://curl.se/ca/cacert-2024-09-24.pem

支持的扩展

系统 扩展
Linux Core, date, libxml, openssl, pcre, sqlite3, zlib, amqp, apcu, bcmath, calendar, ctype, curl, dba, dom, sockets, event, hash, fileinfo, filter, gd, gettext, json, iconv, SPL, session, standard, mbstring, igbinary, imagick, exif, mongodb, msgpack, mysqlnd, mysqli, pcntl, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, Phar, posix, readline, redis, Reflection, shmop, SimpleXML, soap, sodium, sqlsrv, sysvmsg, sysvsem, sysvshm, tokenizer, xlswriter, xml, xmlreader, xmlwriter, xsl, zip, memcache, Zend OPcache
MacOS Core, date, libxml, openssl, pcre, sqlite3, zlib, amqp, apcu, bcmath, calendar, ctype, curl, dba, dom, sockets, event, hash, fileinfo, filter, gd, gettext, json, iconv, SPL, session, standard, mbstring, igbinary, imagick, exif, msgpack, memcached, mongodb, mysqlnd, mysqli, pcntl, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, Phar, posix, random, readline, redis, Reflection, shmop, SimpleXML, soap, sodium, sqlsrv, sysvmsg, sysvsem, sysvshm, tokenizer, xlswriter, xml, xmlreader, xmlwriter, xsl, zip, Zend OPcache
Windows Core, amqp, apcu, bcmath, bz2, calendar, ctype, curl, date, dba, FFI, fileinfo, filter, gd, hash, iconv, json, pcre, msgpack, SPL, openssl, mbstring, random, Reflection, session, shmop, sockets, standard, sqlite3, sqlsrv, mysqlnd, sysvshm, tokenizer, zip, zlib, libxml, dom, exif, igbinary, mysqli, PDO, pdo_mysql, pdo_sqlite, pdo_sqlsrv, Phar, redis, SimpleXML, soap, xml, xmlreader, xmlwriter, Zend OPcache
×
🔝