Introduction to PHP
Welcome to the PHP documentation! This section covers what PHP is, why it's worth learning, and how this site's two build-along tracks fit together.
What is PHP?
PHP is a server-side scripting language built for the web. It ships with a built-in web server, a huge standard library covering HTTP, files, and databases out of the box, and one of the largest hosting/ecosystem footprints of any language — a large share of the web (including WordPress and Laravel-powered sites) runs on it.
Why Learn PHP?
- Ubiquity — cheap, widely available hosting; runs almost anywhere
- Low barrier to entry — no build step required to start;
php -Sgets a server running in seconds - Ecosystem — Composer for package management, PSR standards for interop, mature frameworks (Laravel, Symfony)
- CMS reach — WordPress alone powers a large fraction of the web, all of it PHP
- Fast iteration — no compile step; edit a file, refresh the browser
Two Tracks on This Site
This site builds two independent artifacts as you work through the tiers:
- JSON HTTP API (
beginner→intermediate→advanced) — a small API on PHP's built-in server, extended with persistence, then hardened for deployment - CLI Tool (
cli-tool) — a small command-line PHP tool, no framework
A third track, PHP Language, is a fundamentals deep-dive independent of either artifact — pick it up whenever you want the mechanics explained in depth.
Getting Started
Continue to Getting Started to install PHP and run your first script.