Answer: PHP is an open-source, server-side scripting language used to create dynamic web pages.
Key points:
- Server-side: PHP code runs on the web server. The server executes it and sends only the resulting HTML to the browser, so the user never sees the PHP code.
- Dynamic pages: it can produce different content for different users, e.g. showing a logged-in user's name or results fetched from a database.
- Embedded in HTML: PHP code is written inside
<?php … ?> tags in a .php file.
- Database support: works easily with MySQL and other databases; commonly used for forms, sessions, cookies and login systems.
- Created by Rasmus Lerdorf in 1994; free and cross-platform. WordPress and many large websites are built with it.
<?php
echo "Hello, World!";
?>