Mock Interview Summary - Backend Developer (PHP/CodeIgniter)
1. Introduction
Q: Can you briefly introduce yourself and share what excites you about backend development?
A: My name is Muhammad Irfan. I graduated in Computer Science from the University of Sargodha. I recently
worked as a Laravel full-stack developer at Solochoicez. Before that, I worked at United Sol on PHP and
CodeIgniter projects. I began my career with an internship at Pixako Technologies, focusing on CodeIgniter. I
enjoy backend development, especially building APIs and integrating systems like payment gateways.
2. PHP Basics
Q: Explain the difference between include, require, include_once, and require_once.
A: These are used to include external files. `include` gives a warning if the file is missing, while `require`
stops execution. `include_once` and `require_once` prevent duplicate inclusion of the same file.
3. MVC in CodeIgniter
Q: How does the MVC architecture work in CodeIgniter?
A: MVC stands for Model-View-Controller. The route matches the URL and invokes the controller. The
controller calls the model to fetch data from the database, then sends it to the view for display to the user.
4. SQL Query
Q: Write a query to fetch top 3 products with the highest price.
A: SELECT product_name FROM products ORDER BY price DESC LIMIT 3;
To optimize, create an index on the `price` column.
5. REST API in CodeIgniter
Q: How do you create a RESTful API in CodeIgniter and secure it?
A: Define routes in `[Link]`, create a controller to handle requests, and use models for DB operations.
Secure APIs using API keys or JWT tokens, passed in headers. Validate tokens before processing requests.
6. Project Experience - SAFILO POS
Q: Tell us about your role in the SAFILO POS project.
A: I built the backend using CodeIgniter for POS functionalities like stock management, inventory, and
Mock Interview Summary - Backend Developer (PHP/CodeIgniter)
product CRUD operations. I handled business logic and ensured the system was optimized for daily use in a
retail environment.