PHP

Server-side scripting for the web

100% free · no signup to read 34 chapters Programming language

Created

1995 by Rasmus Lerdorf

Type

Server-side scripting language

Runs on

Any web server with PHP installed

Current version

PHP 8.3 (2023)

Powers

~77% of websites with known server-side language

CMS platforms

WordPress, Drupal, Joomla

File extension

.php

Best for

Server-rendered web pages, APIs

What is PHP?

PHP is a server-side scripting language designed for web development. Code runs on the server, generates HTML, and sends it to the visitor's browser — they never see your PHP source.

Why PHP?

PHP powers roughly 77% of all websites with a known server-side language, including WordPress (43% of the entire web). It's the easiest language to get a dynamic website running.

Feature PHP Python Node.js
Learning curve Easy Easy Medium
Hosting Everywhere Everywhere Everywhere
CMS ecosystem WordPress, Drupal Wagtail, Django CMS Strapi, Keystone
Speed Fast (8.x JIT) Medium Fast (V8)
Best for CMS, traditional web Data science, APIs Real-time, APIs

What you'll learn

Chapter What you'll know
Introduction What PHP is, how it runs
Syntax Variables, control flow, arrays
Forms Processing user input
MySQL Database integration

Start with introduction.