Mac M2芯片配置PHP环境

Mac M2芯片配置PHP环境

1. XAMPP

官网地址 https://www.apachefriends.org/



安装

安装完成

web server打开后,在打开localhost 成功!

2. PHPBrew(PHP版本管理)

官方文档 https://github.com/phpbrew/phpbrew/blob/master/README.cn.md

HomeBrew关于 PHPBrew的文档 https://formulae.brew.sh/formula/phpbrew

安装
这里我们通过homebrew安装

powershell 复制代码
brew install phpbrew


init

powershell 复制代码
Using root: /Users/fanzhen/.phpbrew
Initialization successfully finished!
<=====================================================>
Phpbrew environment is initialized, required directories are created under

    /Users/fanzhen/.phpbrew

Paste the following line(s) to the end of your ~/.bashrc and start a
new shell, phpbrew should be up and fully functional from there:

    source /Users/fanzhen/.phpbrew/bashrc

To enable PHP version info in your shell prompt, please set PHPBREW_SET_PROMPT=1
in your `~/.bashrc` before you source `~/.phpbrew/bashrc`

    export PHPBREW_SET_PROMPT=1

To enable .phpbrewrc file searching, please export the following variable:

    export PHPBREW_RC_ENABLE=1


For further instructions, simply run `phpbrew` to see the help message.

Enjoy phpbrew at $HOME!!

<=====================================================>
powershell 复制代码
# phpbrew
source /Users/fanzhen/.phpbrew/bashrc
export PHPBREW_SET_PROMPT=1
export PHPBREW_RC_ENABLE=1

之后就可以正常使用了

安装php7.4.33版本

powershell 复制代码
phpbrew install 7.4.33 +default


但是这里下载的速度太慢了需要解决!!!

参考

  1. PHPBrew 使用指南 https://www.jianshu.com/p/d5b0d40e56ee
  2. phpbrew set mirror(加速)https://minbaby.github.io/post/2018-11/phpbrew-set-mirror/
相关推荐
郑州光合科技余经理3 小时前
国际版外卖系统:税率字段怎么和订单主流程解耦
android·java·开发语言·前端·后端·php·ai编程
云边云科技_云网融合6 小时前
工业互联网组网方案全景解析:从低延迟网络到安全隔离的四大核心支柱
网络·安全·php
aixingpan11 小时前
aixingpan.cn API开发文档:api_docs_bichart_natalvssolararc2接口指南
前端·php
子非鱼a14 小时前
【WEB】WriteShell
php
闲云野鹤在人间16 小时前
Docker入门|第3章 镜像详解
linux·网络·docker·容器·centos·云计算·php
sbjdhjd16 小时前
从兼容路由到任意方法调用:ThinkPHP 5.1.29 RCE 复现与调试复盘 | 06
经验分享·安全·网络安全·数据挖掘·开源·php·rce
JaguarJack17 小时前
PHP Trait 为何可能成为语言的关键特性
后端·php·服务端
BingoGo17 小时前
PHP Trait 为何可能成为语言的关键特性
后端·php
PHP实战开发录18 小时前
PHP接口怎么防重复提交
系统架构·php·开发