简体   繁体   English

如何使用Homebrew在macOS Mojave上升级PHP版本?

[英]How to upgrade the PHP version on macOS Mojave using Homebrew?

I was reading some of the older solutions for this on Stack overflow but turns out homebrew/php is now deprecated so none of the previous solutions seem to be working now. 我在堆栈溢出时正在阅读一些较旧的解决方案,但事实证明不建议使用homebrew/php因此以前的解决方案似乎都无法正常工作。

The reason why I want to update my version of PHP is because I'm trying to use the NumberFormatter class but it cannot be found. 我想更新PHP版本的原因是因为我试图使用NumberFormatter类,但找不到它。 I can't find the php-intl extension on Homebrew either. 我在Homebrew上也找不到php-intl扩展名。

Any help with this would be GREATLY appreciated! 任何帮助将不胜感激!

"Realistically, you can't." “实际上,你做不到。”

Instead, your situation is analogous to "running <X> in a shared hosting environment," where you cannot change the host's environment but you can arrange for your software to run in an environment of your own choosing. 相反,您的情况类似于“在共享主机环境中运行<X>”,在该环境中,您无法更改主机环境,但可以安排软件在自己选择的环境中运行。

"The particulars of this entirely depend, of course, upon 'what is your exact situation,'" so I cannot meaningfully comment further, but please ... "Google it." “当然,具体情况完全取决于' 您的确切情况',”因此我无法进一步发表有意义的评论,但请...“对其进行搜索”。 (And this comment, by the way, IS NOT meant to be in any way "dismissive," as you will plainly see when you begin to explore.) (顺便说一句,此评论并不意味着“不屑一顾”,因为您在开始探索时会清楚地看到。)

(And then, by all means, feel free to further-describe your exact situation – once you have done so. We're happy to help ...) (然后,无论如何,请随时进一步描述您的具体情况。我们很乐意为您提供帮助...)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM