You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -79,7 +78,7 @@ There's been a lot of discussion lately about how the PHP community lacks suffic
79
78
80
79
## Who
81
80
82
-
My name is [Josh Lockhart](https://twitter.com/codeguy). I'm the author of the [Slim Framework](https://www.slimframework.com/), and I work for [New Media Campaigns](https://www.newmediacampaigns.com/).
81
+
My name is [Josh Lockhart](https://x.com/codeguy). I'm the author of the [Slim Framework](https://www.slimframework.com/), and I work for [New Media Campaigns](https://www.newmediacampaigns.com/).
description: An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative PHP tutorials around the Web
<metaproperty="og:title" content="PHP: The Right Way"/>
12
-
<metaproperty="og:description" content="An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative PHP tutorials around the Web"/>
<aclass="btn-share" href="https://twitter.com/intent/tweet?text=PHP+The+Right+Way&url=https%3A%2F%2Fwww.phptherightway.com&hashtags=PHP" target="_blank">Share on Twitter</a>
22
+
<aclass="btn-share" href="https://x.com/intent/tweet?text=PHP+The+Right+Way&url=https%3A%2F%2Fwww.phptherightway.com&hashtags=PHP" target="_blank">Share on X</a>
<metaproperty="og:title" content="PHP: The Right Way"/>
12
-
<metaproperty="og:description" content="An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative PHP tutorials around the Web"/>
<aclass="btn-share" href="https://twitter.com/intent/tweet?text=PHP+The+Right+Way&url=https%3A%2F%2Fwww.phptherightway.com&hashtags=PHP" target="_blank">Share on Twitter</a>
22
+
<aclass="btn-share" href="https://x.com/intent/tweet?text=PHP+The+Right+Way&url=https%3A%2F%2Fwww.phptherightway.com&hashtags=PHP" target="_blank">Share on X</a>
## Use the Current Stable Version (8.2) {#use_the_current_stable_version_title}
7
+
## Use the Current Stable Version (8.4) {#use_the_current_stable_version_title}
8
8
9
-
If you are getting started with PHP, start with the current stable release of [PHP 8.2][php-release]. PHP 8.x adds many [new features](#language_highlights) over the older 7.x and 5.x versions. The engine has been largely re-written, and PHP is now even quicker than older versions. PHP 8 is a major update of the language and contains many new features and optimizations.
9
+
If you are getting started with PHP, start with the current stable release of [PHP 8.4][php-release]. PHP 8.x adds many [new features](#language_highlights) over the older 7.x and 5.x versions. The engine has been largely re-written, and PHP is now even quicker than older versions. PHP 8 is a major update of the language and contains many new features and optimizations.
10
10
11
-
You should try to upgrade to the latest stable version quickly - PHP 7.4 [is already End of Life][php-supported]. Upgrading is easy, as there are not many backwards compatibility breaks [PHP 8.0][php-bc-80], [PHP 8.1][php-bc-81], [PHP 8.2][php-bc-82]. If you are not sure which version a function or feature is in, you can check the PHP documentation on the [php.net][php-docs] website.
11
+
You should try to upgrade to the latest stable version quickly - PHP 7.4 [is already End of Life][php-supported]. Upgrading is easy, as there are not many backwards compatibility breaks [PHP 8.0][php-bc-80], [PHP 8.1][php-bc-81], [PHP 8.2][php-bc-82], [PHP 8.3][php-bc-83], [PHP 8.4][php-bc-84]. If you are not sure which version a function or feature is in, you can check the PHP documentation on the [php.net][php-docs] website.
Copy file name to clipboardExpand all lines: _posts/01-04-01-Mac-Setup.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,14 @@ anchor: mac_setup
5
5
6
6
## macOS Setup {#mac_setup_title}
7
7
8
-
macOS comes prepackaged with PHP but it is normally a little behind the latest stable release. There are multiple ways to install the latest PHP version on macOS.
8
+
macOS 12 (Monterey) and later does not come prepackaged with PHP. Earlier macOS versions include PHP but are behind the latest stable release. There are multiple ways to install the latest PHP version on macOS.
9
9
10
10
### Install PHP via Homebrew
11
11
12
-
[Homebrew] is a package manager for macOS that helps you easily install PHP and various extensions. The Homebrew core repository provides "formulae" for PHP 7.4, 8.0, 8.1 and PHP 8.2. Install the latest version with this command:
12
+
[Homebrew] is a package manager for macOS that helps you easily install PHP and various extensions. The Homebrew core repository provides "formulae" for PHP 8.1, 8.2, 8.3 and 8.4. Install the latest version with this command:
13
13
14
14
```
15
-
brew install php@8.2
15
+
brew install php
16
16
```
17
17
18
18
You can switch between Homebrew PHP versions by modifying your `PATH` variable. Alternatively, you can use [brew-php-switcher][brew-php-switcher] to switch PHP versions automatically.
@@ -21,12 +21,12 @@ You can also switch between PHP versions manually by unlinking and linking the w
21
21
22
22
```
23
23
brew unlink php
24
-
brew link --overwrite php@8.1
24
+
brew link --overwrite php@8.2
25
25
```
26
26
27
27
```
28
28
brew unlink php
29
-
brew link --overwrite php@8.2
29
+
brew link --overwrite php@8.3
30
30
```
31
31
32
32
### Install PHP via Macports
@@ -40,14 +40,14 @@ MacPorts supports pre-compiled binaries, so you don't need to recompile every
40
40
dependency from the source tarball files, it saves your life if you don't
41
41
have any package installed on your system.
42
42
43
-
At this point, you can install `php54`, `php55`, `php56`, `php70`, `php71`, `php72`, `php73`, `php74`, `php80`, `php81` or `php82` using the `port install` command, for example:
43
+
At this point, you can install `php54`, `php55`, `php56`, `php70`, `php71`, `php72`, `php73`, `php74`, `php80`, `php81`, `php82` or `php83` using the `port install` command, for example:
44
44
45
45
sudo port install php74
46
-
sudo port install php82
46
+
sudo port install php83
47
47
48
48
And you can run `select` command to switch your active PHP:
0 commit comments