在两个版本的PHP之间切换

我最近在Windows上安装了Chocolately。然后,我成功安装了两个版本的PHP(7.4.5)和(7.2.30)。现在,我试图弄清楚如何在两个版本之间切换。

Is there a command to quickly switch between two versions of PHP (or any package for that matter)? For Ruby, I believe you have to install a separate package - https://chocolatey.org/packages/pik#description

提前致谢!

NOTE: I've installed 7.4.5 by simply executing choco install php and then 7.2.30 by executing choco install php --version 7.2.30 -my. After running both, running php -v would result in 7.4.5.

评论