EMZETT.
Login

PHP

In short: A server-side scripting language, originally developed specifically for web development — classically runs on the server and produces HTML sent to the browser.

In more detail: PHP code is embedded directly into HTML files (<?php ... ?>) and interpreted by the server on every page load. It’s the basis of many widely used systems (WordPress, many classic web shops) and runs on practically any web hosting offer with no additional setup.

In Depth

<html>
<body>
  <?php
    $name = "World";
    echo "Hello, " . $name;
  ?>
</body>
</html>

PHP’s original model was deliberately simple: a .php file mixes HTML and embedded PHP code, the server executes the PHP parts on every call and sends the resulting HTML to the browser — no separate build step, no complex infrastructure needed, just put the file on a web server with PHP support. This low barrier to entry made PHP the dominant language for dynamic websites in the 2000s.

Despite occasional criticism of historical design decisions (inconsistent standard-library naming conventions, loose type coercion in older versions), PHP still powers an enormous share of the web today — WordPress alone runs on a large share of all websites worldwide. Modern PHP frameworks (e.g. Laravel, Symfony) and PHP 8+ have addressed many of the historical weaknesses and bring modern language features (typing, better error handling).

History and origin of the name

PHP was developed in 1994 by Rasmus Lerdorf, initially as a simple collection of Perl scripts to manage his personal homepage — the name originally stood for “Personal Home Page Tools”, today it’s recursively interpreted as “PHP: Hypertext Preprocessor”. This pragmatic origin, grown out of concrete need, still shapes the language today: PHP was never designed according to a strict academic language-design concept, but grew organically around practical web development requirements, which explains both the low barrier to entry and the often-criticised inconsistencies in the standard library.

The request-response model

A fundamental difference from Node.js-based systems (like Next.js) is the execution model: a classic PHP server starts a completely new process (or thread) for every incoming HTTP request, which executes the file from start to finish and then discards its entire state — by default there’s no persistent application state between requests, every request starts “from zero”. This simplifies many aspects (no memory leak can build up across requests, a crashing request doesn’t affect others), but requires explicit external storage like sessions, databases or caches for stateful data — unlike a permanently running Node.js process, which can keep state directly in memory between requests.

PHP today

Modern PHP versions (PHP 8.0+) have addressed many past criticisms: stricter typing (optional, but available), a just-in-time compiler for better performance, improved error handling with clearer exceptions instead of silent failures, and modern language features like enums and readonly properties. Together with mature frameworks like Laravel, PHP remains a productive, well-documented choice for many teams for classic server-side-rendered web applications, even though modern JavaScript/TypeScript frameworks now dominate the space of highly interactive single-page applications.

See also: SQL, HTML, MySQL