Skip to content
BENIBIX Learn

Hypertext Preprocessor (PHP)

Development🔤 LanguagesPopular Languages

Also known as PHP

A language that runs on the web server. It builds each page before it is sent.

Think of it like

Think of it like a cook behind a café counter. You order, and the cook makes your plate before it comes out.

Example

A WordPress blog uses PHP to fetch Emma's ten latest posts. Then it builds the home page.

Why it matters

A huge number of websites still run on PHP. Fixing or moving any of them means reading it.

Definition

PHP is a language that runs on a web server and builds web pages. It can read a database, fill in a page with the results and send back finished HTML. WordPress, which runs a large share of websites, is written in PHP. It is easy to start with, because many cheap hosts run it already. Rasmus Lerdorf made the first version in the mid 1990s.

Example code

php
<?php
echo "Hello, world!";
The server runs this and sends back the words, not the code.

Common mistake

Thinking PHP runs in the browser. The visitor only ever gets the HTML it produced.

Key takeaways

  1. 1
    Runs on the server. The browser never sees the code.
  2. 2
    Builds pages. It fills a page with data, then sends it.
  3. 3
    Runs WordPress. Much of the web depends on it.

Learn it properly