History of PHP: From PHP/FI to Modern Web Development

History of PHP

You use PHP every day if you build websites, but most people do not know where it came from or how it got this far. PHP did not start as a programming language.

It started as a small set of tools, and it grew over time through a mix of need and community input.

In this article, we will cover the lifetime of PHP from a few CGI scripts in 1994 to a major part of modern web development. Let’s get started.

PHP Tools and FI ( Forms Interpreter )

Rasmus Lerdorf wrote a few scripts in C to track traffic on his resume page in 1994. He called it “Personal Home Page Tools” or PHP Tools.

These scripts ran through CGI and were not meant for public use at first. But in June 1995, he shared the source code. People could now use it and fix bugs. And also improve it.

Rasmus rewrote the code and called it FI, short for “Forms Interpreter.” It could read form data and work inside HTML.

It was like a basic scripting tool. You had to embed code in HTML with comment tags, and the syntax looked a bit like Perl.

Here is an example:

<!-- Process form data -->
<!--getenv HTTP_USER_AGENT-->
<!--if substr $exec_result Mozilla-->
  <p>You're using a Netscape browser!</p>
<!--endif-->

<!-- Form handling -->
<!--if $form_submitted-->
  <p>Hello, <!--$name-->! Your age is <!--$age-->.</p>
<!--else-->
  <form action="/cgi-bin/fi.cgi/~user/page.phtml" method="POST">
    Name: <input type="text" name="name"><br>
    Age: <input type="text" name="age"><br>
    <input type="submit" name="form_submitted" value="Submit">
  </form>
<!--endif-->

He combined both projects into a new version called PHP/FI in October 1995. This version introduced more advanced features like support for databases and user-defined functions.

A PHP/FI script looked like this:

<!-- Database query (mSQL example) -->
<!--sql mSQL select * from users where id='$user_id'-->
<!--if $numentries > 0-->
  <p>User found: <!--$user_name--> (ID: <!--$user_id-->)</p>
<!--else-->
  <p>No user found.</p>
<!--endif-->

<!--include /common/footer.html-->

Let’s move on to the following section to see how it improved in the following year.

PHP/FI 2.0

PHP/FI gained more features in 1996. It supported cookies and worked with different databases like MySQL and Postgres95. It also gave people a real reason to use it for dynamic websites.

PHP/FI reached version 2.0 in June 1997, but it had limits. Most of the code came from one developer, and the language needed a complete overhaul.

It had about 60,000 installs. That was about 1% of the internet in 1998—pretty strong for a language still finding its shape.

The New Engine in PHP 3

Andi Gutmans and Zeev Suraski needed a better tool for a school project in 1997.

PHP/FI 2.0 could not do what they needed, so they rewrote the parser from scratch. They reached out to Rasmus. Instead of working separately, they joined forces and launched PHP 3 in 1998.

This version was the first time PHP had a proper engine. It supported many databases and added better syntax.

PHP 3 also introduced extension support, so developers could write custom modules.

By mid-1998, PHP 3 ran on over 70,000 domains. The language had outgrown its early roots.

That did not stop there! PHP4 was started in response to demand. Let’s move on to the following part to see that.

PHP 4

Andi and Zeev started work on a new engine. They called it Zend, a mix of their first names. This engine focused on better performance and more structure.

PHP 4 launched in May 2000 with Zend Engine 1.0. It brought HTTP session support, output buffering, and better security.

These changes made it easier to build full web apps—not just scripts. Developers could now handle logins, forms, and user tracking more efficiently.

PHP 5

In 2004, PHP 5 arrived with Zend Engine 2. It added full object-oriented programming. Developers could now write reusable code with classes, methods, inheritance, and exceptions.

This version also improved XML support and added tools for better web services.

PHP 5 stayed around for a long time. It saw many updates and became the standard for big websites and web apps.

PHP 6

There was a plan for PHP 6 to include native Unicode support. That turned out harder than expected.

Developers dropped the Unicode feature, and the rest of the improvements got split between PHP 5.3 and 5.4. Because of that, PHP 6 was never released as a full version.

PHP 7

In 2015, PHP 7 launched with Zend Engine 3. This release doubled performance in many cases and used memory better. It added strict typing, scalar type hints, anonymous classes, and better error handling.

PHP 7.1 to 7.4 kept adding features: typed properties, shortlist syntax, and better support for modern development patterns.

JIT and Match Expressions in PHP 8

PHP 8.0 came out in 2020. It introduced the Just-In-Time (JIT) compiler, which made some types of code much faster.

It also added named arguments, union types, attributes, and the nullsafe operator.

PHP 8.1 and 8.2 followed with features like enums, fibers, read-only properties, and Disjunctive Normal Form (DNF) types.

PHP 8.3 added typed class constants and more cleanups to the language.

The Zend Engine has many features. Visit the article on what PHP is and how the interpreter works to learn more.

Wrapping Up

You learned about PHP’s history from its humble beginnings as a set of CGI scripts to becoming one of the most famous programming languages in web development.

Here is a quick recap:

  • In 1994, Rasmus Lerdorf created PHP Tools to track visitors on his personal page. This evolved into PHP/FI, which included form handling and basic database interactions.
  • PHP/FI 2.0 added features like cookies and database support, but it still had limitations, leading to the development of PHP 3 in 1998.
  • PHP 3 introduced a proper engine, extension support, and better syntax, which helped it grow in popularity.
  • PHP 4, released in 2000, included Zend Engine 1.0, improving performance, security, and adding support for dynamic web applications.
  • PHP 5, released in 2004, brought object-oriented programming and major updates, setting the standard for modern web development.
  • PHP 6, planned with native Unicode support, was never fully released, and its features were split into PHP 5.3 and 5.4.
  • PHP 7, launched in 2015, greatly improved performance and introduced modern features like strict typing and anonymous classes.
  • PHP 8, released in 2020, added the Just-In-Time compiler, match expressions, and other optimizations, continuing PHP’s evolution.

Reference:

Previous Article

filter_has_var Function: Check if Input Exists in PHP

Next Article

PHP compact Function: Assoc Array from Variables

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Subscribe to Get Updates

Get the latest updates on Coding, Database, and Algorithms straight to your inbox.
No spam. Unsubscribe anytime.