WEBVTT

00:00.020 --> 00:00.350
Hey guys!

00:00.350 --> 00:05.030
So that's a full guide on how to get PHP installed on Mac OS.

00:05.300 --> 00:07.580
The guide is available on my website.

00:07.580 --> 00:11.030
It's always the most up to date source for you.

00:11.060 --> 00:12.890
Now let me guide you through this.

00:12.920 --> 00:14.030
On the video.

00:14.030 --> 00:17.540
So let's keep the minimum requirements.

00:17.540 --> 00:21.650
You might want to check if you've got the right Mac OS version.

00:21.650 --> 00:25.280
You can always check this in about this Mac.

00:25.310 --> 00:26.030
There it is.

00:26.030 --> 00:27.770
You've got the version right here.

00:27.800 --> 00:31.970
Now you also need this command line tools for Xcode.

00:31.970 --> 00:37.520
But as soon as you will try installing anything, I think that Mac OS might ask you for this.

00:37.520 --> 00:39.890
So then just proceed with installing this.

00:39.890 --> 00:44.840
And I think that it is high probability you already have that.

00:44.870 --> 00:47.930
Now the first step is to install homebrew.

00:47.960 --> 00:53.240
That's a package manager for Mac OS, a must have for every developer.

00:53.240 --> 00:55.190
It's super easy to install.

00:55.220 --> 01:00.590
I've provided a command to run, you just need to copy and paste it into the terminal.

01:00.590 --> 01:06.590
I'm not going to do that because I already have homebrew, but that's your first step right?

01:06.590 --> 01:09.670
After you do that, run brew update.

01:10.000 --> 01:19.000
This will just update all the dependencies of home brew and its library, and then you just need to

01:19.000 --> 01:19.810
install PHP.

01:19.840 --> 01:21.880
You do it by running this command.

01:21.910 --> 01:24.040
Brew install php.

01:24.070 --> 01:31.840
With the version as I'm recording this, that is the official most recent version 8.3 and I suggest

01:31.870 --> 01:33.640
you install this one.

01:34.390 --> 01:39.430
So as a quick reminder, in the course, we are assuming you have at least 8.2.

01:39.460 --> 01:46.810
So please make sure you are not using some old PHP version, because a lot of things might just not

01:46.810 --> 01:54.340
work, and I'm not really explaining throughout the course from which version a certain feature is,

01:54.340 --> 02:01.870
so it's best to have the most recent one, and there is no good reason why you would have an old version

02:01.870 --> 02:02.650
anyway.

02:03.550 --> 02:05.650
Next up, let's run this command.

02:05.680 --> 02:08.380
I'm just going to copy paste that brew link.

02:08.620 --> 02:09.970
PHP 8.3.

02:10.300 --> 02:12.670
Um, it was already linked.

02:12.700 --> 02:16.880
Now we just need to Ron P.h.p.

02:16.910 --> 02:17.780
Hyphen v.

02:17.780 --> 02:19.490
And there it is.

02:19.490 --> 02:22.790
We've got the most recent PHP installed.

02:23.270 --> 02:26.210
There is another tool that is useful with PHP.

02:26.270 --> 02:27.740
It's called composer.

02:27.740 --> 02:30.290
It's a package manager for PHP.

02:30.620 --> 02:36.230
We're not going to be talking about composer later in the second half of the course, but if you would

02:36.230 --> 02:42.680
like to install it right away, you can just type brew install composer.

02:45.080 --> 02:48.350
And then you just need to wait a tiny bit.

02:49.850 --> 02:59.450
And as soon as this finishes up, we're going to run composer command to see if it was installed properly.

02:59.480 --> 03:01.790
So let's just give it a minute.

03:05.750 --> 03:06.230
Okay.

03:06.230 --> 03:08.540
So it was quicker than I expected.

03:08.540 --> 03:16.520
And after that you should be able to run Composer hyphen V and see something like this which confirms

03:16.520 --> 03:18.230
you've got composer installed.

03:18.230 --> 03:19.400
And there it is.

03:19.400 --> 03:23.450
You are set up, you've got PHP on your system and you are ready for the course.
