Field Guide · language

Also known as: PHP

PHP is a dynamic, interpreted scripting language built for the web back end.1 It is one of the most widely deployed languages on the internet, historically criticised for inconsistency, but substantially modernised in versions 7 and 8.

browser request server runsPHP HTML page database
PHP runs on the web server, builds an HTML response per request, and hands it back to the browser.

Overview

PHP was designed to be embedded directly in web pages, and that origin shaped its ecosystem: it ships with nearly every shared web host, which made it the default for a huge share of the web.2 WordPress, much of the world’s content-management software, and major sites are built on it, and modern frameworks like Laravel and Symfony bring disciplined structure. It serves dynamic pages and REST APIs, typically run per request by the server.

Key characteristics

PHP is dynamically and weakly typed (see static vs dynamic typing), garbage-collected, and compiles to bytecode that an engine executes — with an optional JIT added in PHP 8.2 Its reputation for inconsistency is earned: the standard library has irregular function names and argument orders, and older code mixed logic with HTML freely. Versions 7 and 8 changed the picture considerably, adding real performance gains, optional type declarations, and cleaner language features, though its weak typing and accumulated history still draw criticism. Like JavaScript, it is hard to avoid on the web.

Sources

  1. PHP — Wikipedia, for history, design background, and web ubiquity. 

  2. PHP: Hypertext Preprocessor — official site, documentation, and the engine, bytecode, and JIT details.  2

See also