The PHP elephant logo
ARTICLE

PHP the Enduring Frankenstein

Chris Maffey -
Is PHP the Enduring Frankenstein of the Programming World, A tongue in cheek look at the longevity of PHP

PHP the Enduring Frankenstein

In the evolving realm of web programming languages, PHP is a name that has been around for a long time. Despite being constantly declared dead, much like Mary Shelley's misunderstood creature, Frankenstein, PHP has shown a unique ability to endure, adapt, and remain relevant. While the comparison between PHP and Frankenstein may seem strange at first, it becomes more apt upon a closer look at the characteristics and evolution of both.

To begin, let's remember that Frankenstein's monster was made from an assemblage of different parts, an amalgamation of disparate elements brought together to form a new, functional entity. PHP, similarly, was not designed with a formal specification in mind. PHP was designed as a simple scripting language allowing HTML developers to add back end functionality to their websites.  It grew organically, often incorporating features from various programming languages, and expanded its functionalities to meet the evolving needs of web development.

In the early days, PHP was a simple tool for making static web pages dynamic. As it evolved, it began to incorporate object-oriented programming, namespaces, and later, functional programming features. This collection of varied components, much like Frankenstein's monster, has created a language that's very versatile, but also complicated and sometimes difficult to predict.

PHP core syntax and function declarations were designed to closely mimic C.  PHP is often criticised for having inconsistencies, such as string and array functions accept needle and haystack parameters in the opposite order. This is not a flaw, it is a feature designed to mimic underlying C functions as close as possible.  Frankenstein's monster was created in the image of a human being, surely some of the monsters flaws are simply traits inherited from human beings. 

This leads to another parallel: Frankenstein's creature was often misunderstood and feared, as is PHP by many programmers today. PHP has a reputation for being messy and inconsistent, with a syntax that can be unpredictable due to its organic growth. It's often seen as a language of the past, inadequate for modern web development. However, this perception is not entirely fair. PHP, like Frankenstein's monster, is more than what it appears to be on the surface.

Despite its flaws, PHP offers several advantages that make it persistently relevant. It is easy to learn, has a large and active community, and has a vast ecosystem of tools and libraries. Its shared-nothing architecture makes it ideal for many web scenarios, and it's perfectly suited for content-driven websites, as evidenced by the popularity of WordPress, which is built on PHP.

The continuous efforts to improve PHP also resemble the resilience of Frankenstein's monster. For instance, the release of PHP 7 brought significant enhancements in speed and memory usage, and the introduction of a formal specification and type declarations have addressed some of its major criticisms. PHP 8 went even further, bringing in features like Just-In-Time compilation and attributes, making PHP more robust and performant.

Moreover, PHP's tight integration with the web server stack and its ubiquity in the web hosting environment make it hard to replace. The majority of the web is still powered by PHP, and many businesses rely heavily on PHP applications, which ensures its continued use and development.  Even massive web businesses such as Facebook still rely heavily on PHP.

Just as Frankenstein's monster kept going, driven by a desire for acceptance and understanding, PHP continues to evolve and persist in the face of criticism. It continues to be a vital part of the web, powering popular platforms and serving millions of websites worldwide.

In conclusion, while PHP might be considered the Frankenstein of the programming world due to its patchwork origins, complexity, and the fear it sometimes inspires, it's important to remember that it also shares Frankenstein's resilience and adaptability. Much like the misunderstood creature, PHP is far from dead; it keeps on going, evolving, and proving its worth in the ever-changing landscape of web development.

More Articles

PHP is for us

PHP is a server side programming language which gets a bit of flack from the cool kid developers these days. So why do we stick with it?

Read article...

Shifting from Physical to Cloud Hosting

A strange journey where I figure out the benefits of letting go of our physical hosting environment and moving to the cloud.

Read article...

Applying for a job in the software industry

Recently we were recruiting for a new software developer, it has been an eye opening exercise

Read article...