PHP Basics

History of PHP

Maximiliano Firtman

Maximiliano Firtman

Independent Consultant
PHP Basics

Check out a free preview of the full PHP Basics course

The "History of PHP" Lesson is part of the full, PHP Basics course featured in this preview video. Here's what you'd learn in this lesson:

Maximiliano shares a brief history of PHP, from its early beginnings in 1993 through the current version 8, which was released in 2020. This lesson also explains the PHP elephant mascot.

Preview
Close

Transcript from the "History of PHP" Lesson

[00:00:00]
>> Maximiliano Firtman: PHP was actually created by Rasmus Lerdorf, he was a web designer at the time in 1993. So, he was making his own website. That's the beginning of the web, and he created a set of tools for his webpage initially for him. Like some tools for him. Then he published them as something known as Personal Homepage Tools, PHP tools, okay?

[00:00:29]
He said, well, maybe someone else can use this because it, it's useful. So he released that to the public, and PHP tools became just PHP. So, initially it was personal homepage, okay? But now they changed the definition. I'm not sure if you know what PHP stands for these days.

[00:00:50]
No, no one? So, PHP is not personal homepage anymore, PHP is this. So the H is hypertext, like HTML, this is preprocessor. Some people say it's processor, some people say it's preprocessor, it doesn't matter. And the P is actually for PHP.
>> Student: [LAUGH].
>> Maximiliano Firtman: So it's a recursive name.

[00:01:21]
Okay, so it's PHP hypertext preprocessor, okay? It's just that. So again, originally was personal homepage, but now it's kind of doesn't make any sense, okay? So that's why they changed the idea. Okay, but actually at it wasn't yet something famous that people were actually using. He open-sourced this language and it's inspired by Perl, C, Java, JavaScript and many other things as well.

[00:01:53]
Something important here, Rasmus at that time was not a developer so he was not a programmer, okay? ANd the idea of PHP, so these tools, was not to target developers, was not to be a programming language. It was just a set of tools for web designers to make quick scripts so we they can quickly add some interaction or some dynamic content creation for HTML.

[00:02:27]
That was the idea, okay? And that's kind of the reason why PHP is how it is. I'm not sure if you have critics on PHP, as a language, there are a lot. There are a lot of haters, okay, in the developer community. And typically one of the arguments is that the language is not consistent internally, and it's true.

[00:02:54]
But the reason is because it wasn't intended to be a programming language. Then it grabbed a lot so it was growing and growing and growing and growing and that's why you will see that the the way to do things sometimes is not consistent. I know sometimes a function has I mean just to give you a quick idea of what I'm a very simple idea.

[00:03:14]
So you have some functions that is for example is null, okay there is a function is null. But there is another one that is called set. One has underscore, the other one doesn't have an underscore. It's just a very simple example of a lot of things that you will see in PHP like this.

[00:03:34]
That lack of consistency is annoying a lot of developers coming from other languages that are more classic, more following rules, okay? And PHP is not following any rule, actually. So, it's inspired by many languages. So, if you're coming from JavaScript, you will see some things that it looks like JavaScript.

[00:03:56]
There are a lot of things that are coming from Java and C++ even. Mostly, they all are OOP part, the you create classes, how you define attributes and methods. It's very similar to Java, so it's actually copying the Java idea. And actually it was the language used by Mark Zuckerberg to create the Facebook that was the first name of facebook.com.

[00:04:19]
And this is just something that I will borrow from Rasmus. So we were speakers, I think two events. So we both were speakers at the same events. I'm not sure in which one he said this in one of his speech, he actually look into the original Mark Zuckerberg Facebook code.

[00:04:44]
He actually saw that code, and he said it was really crappy, it was the worst code written ever. But he wasn't actually saying this as a negative thing, actually, he was proud that that crappy code led into a billionaire company. And actually, I think that's a good definition of the power of PHP.

[00:05:15]
Yeah, you can be a crappy developer and still get things up and running, and working. And that's why you have a lot of haters as well. History, not because the history is important, but I wanna just talk about some milestones on PHP. PHP 3 was the first one that was actually used by a lot of people.

[00:05:36]
Actually, that was the first one I used. Okay, when I checked Into my backup code in the code base that I have in my backup, my first PHP script is actually on that version. PHP 3, it was actually a year after 1999. But I think the one that got everyone into PHP was PHP 4, okay?

[00:05:59]
Something interesting In about that. That's 24 years ago, okay? But now, if I'm going to the PHP website again, you can go over the website all the history, okay, on versions. Let me see if I can find this directly version history, so
>> Maximiliano Firtman: Version 4 is still not deprecated.

[00:06:29]
The only one that is deprecated is PHP 3. So you can see support for 3 is discontinued. Okay, thank you for telling me that. But that's not for 4.
>> Maximiliano Firtman: Version 4 is still being maintained for bug fixes, security fixes, it's still active, which is incredible, okay? Compare that with any other platform, okay, that's not the case.

[00:06:58]
Only three is actually discontinued. Of course, we are not going to use PHP 4, but of course, the problem is that there are a lot of websites out there still using PHP 4. So PHP 5 was actually a big, a big shift. I remember that moment. I remember magazine covers talking about that because PHP 5 was not compatible with 4.

[00:07:25]
So you had to change your code. Actually, because 4 has had a lot of security issues that I will mention some later, so they had to change some things. Remember, it wasn't originally organized as a programming language. They were just adding features there, like a bag of features, and yeah, at some moments, they realized, hey, this has security issues, we have problems, and so on.

[00:07:52]
Then, version 6 never existed, and they had some fights there, it doesn't matter, and 10 years have passed until version 7, and now we are in version 8, that was released a couple of years ago, actually during the pandemic. And so we will remember that as the pandemic PHP, PPHP.

[00:08:16]
So, one of the things is that PHP 8 removed a lot of crappy syntax that were historical syntax. So it's trying to get into a track where it's a better language. Okay, so PHP 8. So if you have developers or colleagues that are making fun of the syntax of PHP, PHP or things like that, where PHP 8 has removed a lot of stuff that was possible before that was making a lot of noise in the developer community.

[00:08:52]
So it's getting there, okay, it's trying to be a better primary language. So, the mascot. The mascot, it's the elephant, okay? The elephant is this one, I have one here, okay? So the elephant is the mascot. I mean, it's not important, but it has its own history as well.

[00:09:14]
There are collectors, and actually I think that the most expensive one of these elephants was sold as $10,000, something like that. But anyway, it's actually inspired in PHP. So if you look at the PHP capital case, so open your imagination. That looked like the face of the elephant, okay?

[00:09:37]
So this is the elephant, this is the P. Okay, we have a P here, okay, and then that's the body and that's the tail of the elephant. So actually, the designer look at the the letters and say, that looks like an elephant, okay? And he designing the elephant and named that elephant as ElePHPant with the PHP inside that.

[00:09:59]
Anyway, there is even an official website where you can buy elephants in case you want, okay? But it's interesting because that was in the 90s, right, not now. And now we have our own idea of why it's an elephant. Because yeah, it's an old language, it's heavy, I mean, it's an elephant.

[00:10:23]
And it has its presence in the animal world, but it's not because of that, it was just because someone thought that PHP looks like an elephant.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now