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.
Course chapters
1 PHP Introduction Up next2 PHP Syntax 3 PHP Comments 4 PHP Variables 5 PHP Data Types 6 PHP Strings 7 PHP Numbers & Math 8 PHP Constants 9 PHP Operators 10 PHP If...Else 11 PHP Switch & Match 12 PHP Loops 13 PHP Functions 14 PHP Arrays 15 PHP Associative Arrays 16 PHP Array Functions 17 PHP Superglobals 18 PHP Forms 19 PHP Form Validation 20 PHP Date & Time 21 PHP Include & Require 22 PHP File Handling 23 PHP Sessions 24 PHP Cookies 25 PHP Classes & Objects 26 PHP Inheritance 27 PHP Interfaces & Traits 28 PHP Namespaces & Autoloading 29 PHP Exceptions & Errors 30 PHP JSON 31 PHP Database with PDO 32 PHP Prepared Statements 33 PHP Security Essentials 34 PHP Composer & Next Steps