PHP Quiz - Mixed Questions (with
Answers)
✅ Easy Level Questions (Basic Concepts)
1. Q: What does PHP stand for?
A: PHP stands for PHP: Hypertext Preprocessor. Originally it stood for "Personal
Home Page."
2. Q: Who created PHP and in which year?
A: PHP was created by Rasmus Lerdorf in 1994 and released in 1995.
3. Q: What is the extension of a PHP file?
A: .php
4. Q: Is PHP a client-side or server-side scripting language?
A: PHP is a server-side scripting language.
5. Q: Name any one thing that PHP can do.
A: PHP can generate dynamic page content or collect form data, among other
things.
✅ Medium Level Questions (Understanding & Application)
6. Q: Why is PHP considered open-source?
A: Because PHP's source code is freely available to the public to view, use, and
modify.
7. Q: What is the latest version of PHP (as per your slide)?
A: PHP 8.4.5, released on 13 March 2025.
8. Q: Mention two features of PHP that help in developing web applications.
A:
o Embedded in HTML
o Supports database integration like MySQL
9. Q: How does PHP interact with HTML on a webpage?
A: PHP code can be embedded directly into HTML to generate dynamic content
before sending it to the browser.
10. Q: What are the minimum technologies you should know before learning PHP?
A: Basic knowledge of HTML, CSS, JavaScript; later AJAX, JSON, jQuery are helpful.
✅ Hard Level / Interview-Based Questions
11. Q: Explain the difference between PHP 4 and PHP 5.
A:
PHP 4 introduced Zend Engine and better performance.
PHP 5 added Object-Oriented Programming (OOP), PDO, and improved
performance and security.
12. Q: What is server-side scripting and why is PHP suitable for it?
A: Server-side scripting refers to code executed on the server to generate dynamic
content. PHP is suitable due to its ability to handle databases, sessions, file handling,
and security features.
13. Q: How does PHP support OOP (Object-Oriented Programming)?
A: PHP supports classes, objects, inheritance, interfaces, and other OOP principles
allowing modular and reusable code.
14. Q: Why is PHP still relevant despite modern languages like Python or Node.js?
A:
It's easy to learn and deploy.
Massive existing codebase and community support.
Used in CMSs like WordPress.
Fast and lightweight for small to medium applications.
15. Q: How would you set up a local environment to run PHP on Windows?
A:
Download and install XAMPP.
Ensure Apache and PHP are selected.
Start Apache from XAMPP Control Panel.
Place PHP files in the htdocs folder.
Access via http://localhost/filename.php.