Recall & Review
beginner
What is PHP and why do we need to install it?
PHP is a server-side scripting language used to create dynamic web pages. We install it to run PHP code on our computer or server.
Click to reveal answer
beginner
Name two popular ways to install PHP on your computer.
You can install PHP by downloading it directly from the official PHP website or by using a software package like XAMPP or WAMP that includes PHP, Apache, and MySQL.
Click to reveal answer
beginner
What is XAMPP and how does it help with PHP setup?
XAMPP is a free software package that installs Apache server, MySQL database, and PHP together. It makes setting up a local web server easy for running PHP scripts.
Click to reveal answer
beginner
After installing PHP, how can you check if it is installed correctly?
Open your command line or terminal and type
php -v. If PHP is installed, it will show the version number and some details.Click to reveal answer
beginner
What file extension do PHP files use and how do you run a PHP file?
PHP files use the
.php extension. You run them by placing them in your web server's root folder and accessing them through a browser or by running php filename.php in the terminal.Click to reveal answer
Which software package includes PHP, Apache, and MySQL for easy setup?
✗ Incorrect
XAMPP bundles PHP, Apache, and MySQL to help you run a local web server easily.
What command checks the installed PHP version in the terminal?
✗ Incorrect
The command
php -v shows the PHP version installed on your system.What file extension should PHP files have?
✗ Incorrect
PHP files must have the
.php extension to be recognized as PHP scripts.Why do you need a web server like Apache to run PHP files?
✗ Incorrect
PHP code runs on the server side, so a web server like Apache is needed to process PHP scripts.
Which of these is NOT a way to install PHP?
✗ Incorrect
Node.js is a JavaScript runtime, not related to PHP installation.
Explain the steps to install PHP on your computer using XAMPP.
Think about downloading, installing, starting the server, and running PHP files.
You got /5 concepts.
How can you verify that PHP is installed and working on your system?
Use commands and a simple PHP script to confirm installation.
You got /5 concepts.