🔹 1. Theory Questions
- What is PHP? Why is it called a server-side language?
- Who created PHP and in which year?
- What is the difference between client-side and server-side scripting?
- Name any 3 uses of PHP.
- What is XAMPP? Why do we use it?
- What is the role of Apache in XAMPP?
- Where should PHP files be stored in XAMPP?
- What is the latest version of PHP?
- Can the browser read PHP code directly? Why?
- What is the full form of PHP?
🔹 2. Output-Based Questions
👉 Predict the output:
Q1
<?php
echo "Hello PHP";
?>
Q2
<?php
$name = "Aditya";
echo $name;
?>
Q3
<?php
$a = 10;
$b = 20;
echo $a + $b;
?>
Q4
<?php
echo "10" + 5;
?>
Q5
<?php
echo "Hello" . " World";
?>
🔹 3. Error Finding Questions
👉 Find and fix errors:
Q1
<?php
echo Hello World;
?>
Q2
<?php
$name = Aditya;
echo $name;
?>
Q3
<?php
echo "Welcome"
?>
Q4
<?php
$1name = "PHP";
echo $1name;
?>
🔹 4. Practical Coding Questions
👉 Write programs:
Q1
Print your name using PHP
Q2
Create variables for:
- Name
- Age
Print:
👉My name is ___ and I am ___ years old
Q3
Add two numbers and print result
Q4
Print this output:
Welcome to PHP Programming
Q5
Create a PHP file and run it on localhost
🔹 5. Challenge Questions 🚀
Q1
Print:
Hello
World
(Use single echo)
Q2
Create variables:
$a = 5;
$b = 3;
Print:
Sum = 8
Q3
Mix HTML + PHP:
<h1>Welcome Message</h1>
Use PHP to print your name below it
🎯 Bonus Teaching Tip
👉 Ask students to:
- Install XAMPP
- Create 3 PHP files
- Run them in browser






