• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Codemotion Magazine

Codemotion Magazine

We code the future. Together

  • Discover
    • Live
    • Tech Communities
    • Hackathons
    • Coding Challenges
    • For Kids
  • Watch
    • Talks
    • Playlists
    • Edu Paths
  • Magazine
    • AI/ML
    • Backend
    • Frontend
    • Dev Life
    • DevOps
    • Soft Skills
  • Talent
  • Partners
  • For Companies
Home » Backend » 25 years of PHP: history and curiosities by Rasmus Lerdorf
Languages

25 years of PHP: history and curiosities by Rasmus Lerdorf

25 years of PHP: history and curiosities by Rasmus Lerdorf

Last update April 11, 2019 by Vito Gentile

As you probably already know, PHP is one of the best-known server-side programming language used in web applications. Known by a lot of web developers, it has been appreciated for being intuitive and easy to learn, but also often criticised for some peculiar features incorporated in the design. The creator of PHP is Rasmus Lerdorf, who was invited to deliver a speech during Codemotion Rome 2019, on the 25th anniversary of the first PHP release.

In this article, we will summarise the origins of PHP and some curious facts about it, inspired by Lerdorf’s stories and facts discussed during his talk.

In order to understand why and how PHP originated in Lerdorf’s mind, it is useful to provide a bit of an overview of the context in which it was born. In the early ‘90s, the Internet was very different from now. Browsers had very limited options and developers had much fewer options than now to implement web servers. Just to give you an example, the following snippet (shown by Lerdorf during his talk) is an example of how a basic web server was written using C in 1993:

As you can see, building a page required writing low level code and to output both content and headers line by line. Moreover, using C produced long code snippets for doing something quite simple, eg. returning a web page as a response of a HTTP request. There were other programming languages more compact and still powerful (as shown by the Perl snippet below) but such solutions still did not solve a basic problem: the possibility of separating content presentation from the other server business logic (particularly request and response processing).

To solve the problem of content separation, Lerdorf decided to develop PHP, releasing its first version in 1995. His idea was clear: using it as a templating language, where you can embed little snippets just to show outputs of functions or values saved in variables, while the rest of the server-side business logic could continue to be implemented in separated CGI.
For more clarity, the following snippets represent what Lerdorf expected to be the common use of PHP. Basically, the idea was to have a C API for web, allowing us to do something like this:

And then, PHP served as a templating language, embedding functions or variables defined in C directly in the middle of HTML:

You might think that this is quite different from what we usually do with PHP. Indeed, today PHP has the form of a fully-working programming language, with no need of using C API. The original goal of separating presentation from server business logic is often misunderstood, or ignored. Lerdorf explained that his initial idea has been rejected by most people, although he often tried to explain his original position. He finally surrendered to this in 1999, when PHP was already supported (and used) from a plethora of ISP.

After its official release, PHP has become the popular language we know. But this was also due to many other things built all around it. Probably the most important innovation due to PHP is represented by the LAMP stack, which originally meant Linux, Apache, mSQL and PHP, since MySQL was not yet ready. mSQL was a very simple RDBMS, which was included in the original idea exactly for its simplicity, but then replaced when servers required more advanced features.

Today, PHP is widely used in many websites and applications, such as Wikipedia and WordPress, to name but a few.

Before ending with this article, it is worth mentioning a couple of interesting facts and remarks told by Lerdorf during his talk.

First, he mentioned some problems often considered bad design choices of PHP. He started discussing the choice of using case insensitive function names, explaining it with the original idea of content separation Since they needed to be included in a templating language like HTML (which is case insensitive), he designed the API (and thus the resulting language) for being case insensitive in function names.

Another issue analysed was the naming inconsistencies, which Lerdorf explained as simply due to the different conventions in the context where PHP was developed. More generally, most of these issues may indeed been explained by the context where PHP was developed, at the beginning of the Internet and with many things evolving quickly.

Finally, Lerdorf highlighted the importance of working on things that matter and always have a sense of purpose in our everyday life. He says he does not consider himself as a good programmer, but instead a dreamer. And his dreams have become true not just because of his programming skills, but instead because of his sense of purpose, his desire of trying and making new things. We often focus on being great developers, learning every single feature of our preferred programming language. Perhaps working on our goals is the key to drive us to new challenges, discover new passions and thus – maybe – developing another (better) PHP.

facebooktwitterlinkedinreddit
Share on:facebooktwitterlinkedinreddit

Tagged as:Codemotion Rome PHP

Behind the scenes of Codemotion 2019’s opening live coding performance
Previous Post
How to Become A Good Tech Lead
Next Post

Related articles

  • Is It Time to Learn A Legacy Mainframe Language Like COBOL?
  • Lambda Calculus: Functional Programming With No Tears
  • Testing your C# code with xUnit
  • Programming Languages: how to choose the best one
  • Domain-specific languages could scale up your code with ComMA
  • Rasmus Lerdorf on the future of PHP
  • Lorna Mitchell, between CodeReview and PHP7

Primary Sidebar

The IT Industry in Italy: Trending Positions, Salaries, and Main Skills for 2022

Codemotion and Adecco’s guide to understanding the IT working environment in Italy. Download here:

Adecco Whitepaper IT Report

Latest

Using the Twelve-Factor Methodology in Cloud-Native Microservices

Microservices

svelte, javascript frameworks, vue.js, angular

Svelte: Why Is It an Innovation to Javascript Frameworks?

JavaScript

blockchain, avascan, avalanche, defikingdom, subnet

How to Deploy a Subnet on Avalanche Blockchain: The Case of DeFi Kingdom

Blockchain

automation, security, cybersecurity

How to Implement a Security Testing Program For Web Applications

Cybersecurity

metaverse, companies, virtual reality,

Is Your Company Ready to Enter the Metaverse?

AI/ML

Related articles

  • Is It Time to Learn A Legacy Mainframe Language Like COBOL?
  • Lambda Calculus: Functional Programming With No Tears
  • Testing your C# code with xUnit
  • Programming Languages: how to choose the best one
  • Domain-specific languages could scale up your code with ComMA
  • Rasmus Lerdorf on the future of PHP
  • Lorna Mitchell, between CodeReview and PHP7

Footer

  • Magazine
  • Events
  • Community
  • Learning
  • Kids
  • How to use our platform
  • Contact us
  • Become a contributor
  • About Codemotion Magazine
  • How to run a meetup
  • Tools for virtual conferences

Follow us

  • Facebook
  • Twitter
  • LinkedIn
  • Instagram
  • YouTube
  • RSS

DOWNLOAD APP

© Copyright Codemotion srl Via Marsala, 29/H, 00185 Roma P.IVA 12392791005 | Privacy policy | Terms and conditions

  • Magazine
  • Events
  • Community
  • Learning
  • Kids
  • How to use our platform
  • Contact us
  • Become a contributor
  • About Codemotion Magazine
  • How to run a meetup
  • Tools for virtual conferences

Follow us

  • Facebook
  • Twitter
  • LinkedIn
  • Instagram
  • YouTube
  • RSS

DOWNLOAD APP

CONFERENCE CHECK-IN