Fireship · @fireship
PHP in 100 Seconds
Uploaded October 22, 2021 · Length 2:21
Summary
PHP basics: dynamic language for web development, server-side scripting, and building interactive websites.
- php basics
- web development
- server-side scripting
- php tutorial
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
[Music]
- 0:00
PHP a dynamic interpreted scripting
- 0:03
language for building interactive
- 0:04
websites on the server despite the
- 0:06
haters pronouncing it dead it remains
- 0:08
one of the most popular languages for
- 0:10
back-end web development it Powers
- 0:11
content Management Systems like
- 0:12
WordPress top tier websites like
- 0:14
Wikipedia and countless others via
- 0:16
Frameworks like LVL and Symphony hell
- 0:19
man even Facebook uses it although they
- 0:20
built a custom compiler to convert it to
- 0:22
machine code on their servers it was
- 0:24
created in 1994 by Rasmus lerdorf to
- 0:27
manage his personal homepage clever
- 0:29
acronym but it sounds lame for a
- 0:31
language that powers multi-billion
- 0:32
dollar Enterprises so today we practice
- 0:34
cognitive dissonance to tell ourselves
- 0:36
PHP stands for hypertex pre-processor it
- 0:39
has a special place in history because
- 0:41
it predates JavaScript and was one of
- 0:42
the first languages to be embedded
- 0:44
directly in HTML allowing websites to be
- 0:46
built dynamically on a server it's open
- 0:49
source and was one of the technologies
- 0:50
that revolutionized the web by making
- 0:52
application development accessible to
- 0:54
the average person its interpreter is
- 0:56
implemented in C and has a syntax
- 0:58
inspired by Pearl to get started create
- 1:00
a PHP file and add some basic HTML to it
- 1:04
within this file you can go into PHP
- 1:06
mode by opening a question mark PHP tag
- 1:09
the code Within These tags will be
- 1:10
rendered on the server use Echo to
- 1:12
Output a value in the location of the
- 1:14
tag to declare a variable give it a name
- 1:17
that starts with a dollar sign followed
- 1:18
by a value it's a weekly type language
- 1:21
so no type annotations are necessary it
- 1:23
also comes with a large number of
- 1:24
predefined variables geared towards web
- 1:26
development like git post and cookie
- 1:29
which contain information about the
- 1:30
incoming HTTP request now when this code
- 1:33
is rendered on your server it will
- 1:34
output an HTML string with the PHP tags
- 1:37
being replaced by whatever you echoed
- 1:39
the language also supports multiple
- 1:41
programming paradigms you have first
- 1:42
class functions which can be assigned to
- 1:44
variables or used anonymously as
- 1:46
argument and it has tons and tons of
- 1:48
built-in functions to do pretty much
- 1:50
anything a web developer could ever
- 1:51
imagine doing it also has a complete
- 1:54
object model where you can Define
- 1:55
classes with inheritance to implement
- 1:57
objectoriented patterns we're currently
- 1:59
on PHP version 8 which has all the


