Install PHP
Install PHP + a server. College: XAMPP (Apache + PHP + MySQL). Check php -v in a new terminal. Put files in htdocs. URL is localhost, not double-clicking the file.
php -S localhost:8000 is the built-in server for practice. Still use Apache/Nginx in real hosting.
Trap — editing files outside htdocs. Trap: port 80 busy so XAMPP Apache won’t start — use 8080.
Exam tip
XAMPP or php -S. php -v. localhost, not file://.