# Hypertext Preprocessor (PHP)

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

**Field:** Software Development  
**Category:** Languages  
**Also known as:** PHP

## 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.

## 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

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

## Example code

```php
<?php
echo "Hello, world!";
```

The server runs this and sends back the words, not the code.

## Why it matters

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

## Common mistake

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

## Three principles

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

## Related terms

- [JavaScript](https://learn.benibix.com/term/development/javascript)
- [Ruby](https://learn.benibix.com/term/development/ruby)
- [Interpreted Language](https://learn.benibix.com/term/development/interpreted-language)
- [Scripting Language](https://learn.benibix.com/term/development/scripting-language)

## Taught in

- [PHP and Ruby for the Web](https://learn.benibix.com/learn/development-languages/php-and-ruby-for-the-web): Programming Languages, 6/12

---

Source: https://learn.benibix.com/term/development/php
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
