Hey guys!
So that's a full guide on how to get PHP installed on Mac OS.
The guide is available on my website.
It's always the most up to date source for you.
Now let me guide you through this.
On the video.
So let's keep the minimum requirements.
You might want to check if you've got the right Mac OS version.
You can always check this in about this Mac.
There it is.
You've got the version right here.
Now you also need this command line tools for Xcode.
But as soon as you will try installing anything, I think that Mac OS might ask you for this.
So then just proceed with installing this.
And I think that it is high probability you already have that.
Now the first step is to install homebrew.
That's a package manager for Mac OS, a must have for every developer.
It's super easy to install.
I've provided a command to run, you just need to copy and paste it into the terminal.
I'm not going to do that because I already have homebrew, but that's your first step right?
After you do that, run brew update.
This will just update all the dependencies of home brew and its library, and then you just need to
install PHP.
You do it by running this command.
Brew install php.
With the version as I'm recording this, that is the official most recent version 8.3 and I suggest
you install this one.
So as a quick reminder, in the course, we are assuming you have at least 8.2.
So please make sure you are not using some old PHP version, because a lot of things might just not
work, and I'm not really explaining throughout the course from which version a certain feature is,
so it's best to have the most recent one, and there is no good reason why you would have an old version
anyway.
Next up, let's run this command.
I'm just going to copy paste that brew link.
PHP 8.3.
Um, it was already linked.
Now we just need to Ron P.h.p.
Hyphen v.
And there it is.
We've got the most recent PHP installed.
There is another tool that is useful with PHP.
It's called composer.
It's a package manager for PHP.
We're not going to be talking about composer later in the second half of the course, but if you would
like to install it right away, you can just type brew install composer.
And then you just need to wait a tiny bit.
And as soon as this finishes up, we're going to run composer command to see if it was installed properly.
So let's just give it a minute.
Okay.
So it was quicker than I expected.
And after that you should be able to run Composer hyphen V and see something like this which confirms
you've got composer installed.
And there it is.
You are set up, you've got PHP on your system and you are ready for the course.