
What is PHP 5?
PHP is an interpreted language, or scripting language used to build dynamic websites and web applications. It has a long and storied history as the most popular language for web development, but it started as something quite a bit simpler.
Where did PHP start?
PHP started as a simple tool to help bring a bit of dynamic content into HTML files. This was way back in 1994, and it was called “Personal Home Page Tools” (PHP Tools). It was essentially a program written in C that let you embed variable content into HTML files.
This let you do things like this:
<h2><?php echo $post_title; ?></h2>
<?php echo $post_content; ?>
This might seem pretty simple now, but back in 1994 it was a big deal. The internet was really still in its infancy, and most people were hand-coding every page of their website.
The idea took off, and pretty soon a handful of “personal home page tools” became the PHP language. Eventually, the name was recursively-backronymed to “PHP Hypertext Preprocessor.”
Since then it has had several major rewrites and releases, lots and lots of new features added, and has become one of the most popular languages for web development. It is estimated that around 40% of websites are running at least some PHP code.
What is PHP exactly?
It’s a programming language. It’s an interpreted language, which means that PHP code isn’t compiled into a binary executable, but rather is interpreted at run-time.
This sort of language is also called a “scripting language”, and some people refer to programs written in these types of languages as “scripts” rather than “programs”.
It is still focused on the web but is capable of doing a lot more than passing content variables into an HTML template. It is a full-scale language and can accomplish just about anything that any other language can do.
Why is PHP so popular?
Many people consider PHP very easy to read and write. For example, Mark Zuckerberg has said that one of the reasons Facebook uses PHP is that it is easy to get stuff done in PHP – it is “good for hacking on.”
On the other hand, proponents of other languages say similar things. A more likely explanation of its widespread use is WordPress.
WordPress is a blogging and content management system. It powers over 23% of the websites on the internet.
A lot of PHP developers got their start using WordPress, and it’s easy to go from tweaking WordPress themes to writing plugins to building entire web applications.
The barrier to entry for PHP is fairly low, so a lot of people learn PHP. A lot of people learn it, so then a lot of projects get started using it.
PHP grows up
Early versions of PHP weren’t a complete language and didn’t support all the types of things you might normally want to do if you were building a web application. And there were performance issues.
That’s what happens when you try to solve a specific problem. It takes a while to turn a specific solution into a generalized toolset, and even longer to turn it into a complete toolset.
But eventually it happened.
PHP 5
In 2004, PHP 5 was released. With PHP 5, many people believe that the language was now really, truly, a programming language in the full sense of the term.
The biggest change in PHP 5 was support for Object-Oriented Programming.
PHP 5 and Object-Oriented Programming
Object-Oriented Programming (OOP) is a way of conceptualizing and writing a program in which data objects contain both attributes and methods for interacting with those attributes, as well as with other objects.
An example of this in web development is a blog post. The attributes of a blog post might be its title, author, content, and so forth. Methods might include saving it to the database, editing its content, and displaying it on the page.
Even though OOP was invented in the 1960s, it didn’t become mainstream for most programmers and programming languages until the mid-1990s. When PHP was invented, OOP was still a pretty new idea.
Ten years later, after four major version releases of PHP, object-oriented programming had become “the right way” to write software, and the minimal support for OOP concepts in PHP 4 just wasn’t enough.
PHP 5 provided complete support for Object Orientation, along with a number of other improvements that really changed the way people write PHP programs and allowed it to compete with other languages that had started to dominate ‘serious’ web development.

Looking for a great deal on quality PHP 5 hosting?
A2 Hosting came in #1 in our recent speed and performance tests. You can choose from multiple PHP versions with unlimited SSD storage and transfer. Use this special discount link to save up to 50% on these plans.
Closely related features
PHP 5 Frequently Asked Questions
- How can I report an issue with PHP 5?
If you identify an issue, you should review the bug database on the PHP website to make sure it is not already known. If the bug is not already on the database, you should use the reporting form available with the bug database.
- What databases does PHP 5 support?
PHP 5 was built to support a wide variety of databases, including SQLite, MySQL, MS-SQL, PostgreSQL, FrontBase, Mongo, Paradox, filePro, and more. It includes support for dBA, dbx, Open Database Connection standard, and PHP Data Objects.
- If I’m designing a website, do I need to choose either HTML or PHP?
No. PHP is an embedded script, meaning you can add it into an HTML script, provided your server supports PHP. A web-based PHP script is essentially an HTML page with bits of PHP inserted wherever dynamic content is required. You can also embed HTML code into PHP script.
- What functionality does PHP add to HTML?
PHP provides dynamic functionality for your webpage. It can perform calculations such as determining the date or handling mathematical equations. It can collect user input, such as obtaining an imperial measurement to convert it to metric, adding information to an address book, or letting users post to a forum or social media site. PHP can interact with most common databases, and it can be used to create graphics.
- Are there alternatives available that provide the same functionality as PHP?
While you won’t get the exact same functionality from any one program, many of the features PHP adds to web development can be obtained through other sources. PHP was built on other programming languages, including C, so C can be used in place of PHP. Perl was one of the most popular languages for web development prior to PHP. While its syntax is considerably more complex than PHP, it continues to be popular with some developers due to its string manipulation capabilities. The Seaside framework provides the same dynamic functionality with object oriented web development.
Comments