PHP & MySQL Fundamentals What is PHP?
1 / 10
Next
What is PHP? ~10min

What is PHP?

PHP (PHP: Hypertext Preprocessor) is a server-side scripting language. Unlike HTML/CSS/JS which run in the browser, PHP runs on the server — it processes data, talks to databases, and sends back the result as HTML.

How it works

  1. Browser requests page.php
  2. Server runs the PHP code
  3. Server sends back plain HTML
  4. Browser displays it — no PHP visible to the user

Basic syntax

<?php
  echo "Hello World!";
  $name = "Merik";
  echo "Welcome, " . $name;
?>

Every PHP statement ends with a ; semicolon. Variables start with $.

Preview