WEBVTT

00:00.980 --> 00:03.320
Okay, so let's talk about PHP.

00:03.680 --> 00:08.450
The first and the most important question is what's p.h.p.

00:08.480 --> 00:16.310
Well, it is a server side programming language and it was designed for web development in mind.

00:16.340 --> 00:21.710
Now these days it can be used as a general purpose programming language.

00:21.710 --> 00:24.650
But that's not the case very often.

00:24.650 --> 00:28.130
It is still mostly used for web development.

00:28.160 --> 00:36.140
So PHP is open source, and this means that the PHP source code is publicly available for everyone to

00:36.170 --> 00:36.680
see.

00:36.680 --> 00:42.050
And you can also try and contribute to the PHP code.

00:42.770 --> 00:50.840
PHP is cross-platform, it runs on any operating system and it has an extensive built in library.

00:51.200 --> 00:53.330
Now the use cases of PHP.

00:53.330 --> 01:01.670
So as I said, it's mostly used to create dynamic web pages for the server side programming and also

01:01.670 --> 01:04.670
to create command line utilities.

01:04.940 --> 01:12.080
So to give you an example of a command line utility, there is a tool called deployer which is used

01:12.080 --> 01:16.880
to deploy PHP applications on remote Servers.

01:18.740 --> 01:23.150
So there are different aspects of creating the PHP programs.

01:23.150 --> 01:31.040
And actually you would have to understand them separately and some of them require more effort.

01:31.070 --> 01:35.690
Others are just something you learn along the way.

01:35.720 --> 01:42.140
So the first thing that will require your effort is learning the language itself.

01:42.140 --> 01:49.400
So you need to understand the syntax, the data types, all the control structures that control the

01:49.400 --> 01:51.140
flow of the programs.

01:51.230 --> 01:53.810
Then there are functions and classes.

01:53.810 --> 01:56.300
And how do you handle errors.

01:56.780 --> 01:58.010
Now the runtime.

01:58.010 --> 02:04.790
Well that's actually the environment in which the PHP programs you have created run.

02:04.790 --> 02:07.700
So that's the execution process.

02:07.700 --> 02:10.670
How are the PHP programs run?

02:10.700 --> 02:12.830
You will have to eventually understand that.

02:12.830 --> 02:15.950
How is the memory managed?

02:15.950 --> 02:18.650
How does the garbage collection works.

02:18.650 --> 02:25.280
So the runtime, that's a thing that will most probably come to you with experience.

02:25.280 --> 02:29.420
It's not something that you can just learn or read about.

02:29.450 --> 02:32.510
There are some things you should be aware of.

02:32.540 --> 02:39.890
But as I've said, the understanding of the runtime and the environment, this always comes with experience.

02:39.890 --> 02:44.900
The more programs you create and run, the more experience you will gain.

02:44.900 --> 02:53.210
So the last aspect of understanding the PHP programs is how do you actually work with all the features?

02:53.330 --> 03:01.820
So concepts like sessions, cookies, the file uploading, database interactions and handling web requests,

03:01.850 --> 03:09.770
those are not things that are unique to PHP, but you just need to understand how do you work with all

03:09.770 --> 03:17.480
those features using PHP as a language and PHP as a runtime or environment?

03:17.480 --> 03:20.000
So PHP has some specific ways.

03:20.000 --> 03:27.500
For example, sessions and cookies are handled using global variables and functions.

03:27.500 --> 03:29.270
The database interactions.

03:29.270 --> 03:35.870
Well, you might need to understand and use objects and classes for that, etc. etc..

03:35.870 --> 03:45.080
So this is just understanding how you do all those things that are web development related using PHP

03:45.080 --> 03:47.150
as a language and environment.
