InterviewPitch
Land the job you want — prepare
with Real interviews Q&A
Curated interview questions, company-wise guides and coding rounds. Practice mock interviews, improve with feedback, and track your progress.
Q&A
Top curated interview packs
Company-wise & role-wise packs, quality assured.
Mock interview
AI scoring
Coding rounds
Top 10 sets
Beginner
1. What is PHP?
PHP is a server-side scripting language used to build dynamic web applications.
Beginner
2. What does PHP stand for?
PHP stands for Hypertext Preprocessor.
Beginner
3. Is PHP case-sensitive?
Variables are case-sensitive, functions and keywords are not.
Beginner
4. What are PHP variables?
Variables store data and start with $ symbol.
Beginner
5. Difference between echo and print?
echo is faster and supports multiple parameters,print returns a value.
Beginner
6. What is array in PHP?
Array stores multiple values in a single variable.
Beginner
7. What is associative array?
Array with named keys instead of numeric indexes.
Beginner
8. What is session?
Session stores user data across multiple pages.
Beginner
9. What is cookie?
Cookie stores data on the client browser.
Beginner
10. GET vs POST?
GET sends data in URL,POST sends data securely in request body.
Intermediate
16. What is PDO?
PDO provides a secure way to access databases using prepared statements.
Intermediate
17. What is prepared statement?
Prevents SQL Injection by separating query and data.
Intermediate
18. What is include vs require?
require stops script on failure,include only gives warning.
Intermediate
19. What is error handling in PHP?
Using try-catch, error_reporting, and custom handlers.
Intermediate
20. What is OOP in PHP?
Object-Oriented Programming using classNamees and objects.
Intermediate
21. What are PHP magic methods?
Methods starting with __ like __construct(), __destruct().
Intermediate
22. What is namespace?
Used to avoid className name conflicts.
Intermediate
23. What is autoloading?
Automatically loads className files when needed.
Intermediate
24. What is MVC?
Model–View–Controller architecture pattern.
Intermediate
25. What is Laravel?
A popular PHP framework for web applications.
Advanced
31. What is dependency injection?
Injecting dependencies instead of creating them internally.
Advanced
32. What is middleware?
Filters HTTP requests before reaching controller.
Advanced
33. What is REST API?
Architecture for building stateless web services.
Advanced
34. How to prevent SQL Injection?
Use prepared statements and parameter binding.
Advanced
35. What is Composer?
Dependency manager for PHP.
Coding Round
41. Reverse a string
strrev("hello");Coding Round
42. Check palindrome
$str == strrev($str)Coding Round
43. Find factorial
Answer HereCoding Round
44. Count array elements
array_count_values($arr);Coding Round
45. Remove duplicates
array_unique($arr);Coding Round
46. Database connection
$pdo = new PDO("mysql:host=localhost;dbname=db","user","pass");Coding Round
47. Sort array
sort($arr);Coding Round
48. Explode string
explode(",", $str);Coding Round
49. Implode array
implode("-", $arr);Coding Round
50. Check variable type
gettype($var);