Category: Php
-
Viva (oral exam) questions on PHP Error Handling
🎤 PHP Error Handling – Viva Questions 🟢 Basic Viva Questions 🟡 Conceptual Questions 🔵 Practical Viva Questions 🔴 Tricky / Advanced Viva Questions 🎯 Scenario-Based Viva 🧠 Quick Rapid-Fire (Teacher Favorite) 🏆 Bonus Tip for Students If stuck in viva, say: “I will use try-catch for handling exceptions, enable error reporting during development, and…
-
important PHP Error Handling Interview Questions
🎯 PHP Error Handling – Interview Questions 🟢 Basic Level 1. What is error handling in PHP? Answer:Error handling is the process of detecting, managing, and responding to runtime or syntax errors in a PHP script. 2. What are the types of errors in PHP? Answer: 3. Difference between Warning and Fatal Error? Warning Fatal…
-
15. Error Handling (PHP)
Error handling in PHP helps you detect, manage, and debug issues in your code efficiently. 🔴 1. Error Types in PHP PHP has different types of errors: ✅ Common Error Types: Error Type Description E_NOTICE Minor issues (e.g., undefined variable) E_WARNING Non-fatal errors (script continues) E_ERROR Fatal error (script stops) E_PARSE Syntax errors E_DEPRECATED Using…
-
Real-world API integration (payment, weather, AI)
🚀 1️⃣ Payment API Integration (Razorpay Example) 🔹 Use Case: Accept online payments on your website. 🔹 Step 1: Install Razorpay SDK 🔹 Step 2: Create Order (Backend PHP) 🔹 Step 3: Checkout Button (Frontend) 🌦️ 2️⃣ Weather API Integration (OpenWeather) 🔹 Use Case: Show live weather on website/app. 🔹 Step 1: API URL 🔹…
-
14. Working with APIs (PHP)
1️⃣ REST API Basics 🔹 What is an API? API (Application Programming Interface) allows two applications to communicate with each other. Example: 🔹 What is REST API? REST (Representational State Transfer) is a standard way to build APIs using HTTP methods. 🔹 Common HTTP Methods: Method Use GET Fetch data POST Send data PUT Update…
-
Give HR + technical mock interview
🎤 Mock Interview (PHP Developer – Security Focus) 🧑💼 HR Round 1. Tell me about yourself. 👉 (Expected: background, skills, projects, current work) 2. Why do you want to work with our company? 👉 Tip: Avoid generic answers like “growth” only. 3. What is your biggest strength? 4. What is your biggest weakness? 5. Describe…
-
PHP Security Interview Questions (Beginner → Advanced)
🔐 PHP Security Interview Questions 🟢 Beginner Level 1. What is SQL Injection? 👉 A vulnerability where attacker inserts malicious SQL into input fields to manipulate database. 2. How do you prevent SQL Injection in PHP? 👉 Using: 3. What is XSS? 👉 Cross-Site Scripting allows attackers to inject JavaScript into web pages viewed by…
-
13. Security in PHP
Security is critical in web development. A single mistake can expose your database, users, and server. 🛑 1. SQL Injection Prevention ❌ Problem: User input directly added to SQL query: 👉 Attacker can input: ‘ OR 1=1 — ✅ Solution: Use Prepared Statements Using PDO: Using MySQLi: ✔ Prevents SQL injection completely ⚠️ 2. XSS…
-
company-wise questions (TCS, Wipro, Infosys)
🟦 TCS (NQT / Technical Round) 👉 Focus: Basics + MCQs + simple coding 🔹 MCQs (Common Pattern) 🔹 Coding Questions 1. Insert data using PDO 2. Fetch and display users 🔹 Theory Questions 👉 TCS Tip: Questions are easy but tricky wording. 🟪 Wipro (Technical + Coding Round) 👉 Focus: Logic + SQL +…
-
placement-level MCQ test (PHP + MySQL PDO)
🧠 MCQ Test: PHP + MySQL (PDO) 🔹 Section A: Basics (1–10) 1. What does PDO stand for?A) PHP Database ObjectB) PHP Data ObjectC) Personal Data ObjectD) Program Data Object 2. Which function is used to connect PDO?A) mysqli_connect()B) new PDO()C) connect_db()D) db_open() 3. Which fetch mode returns associative array?A) PDO::FETCH_NUMB) PDO::FETCH_ASSOCC) PDO::FETCH_OBJD) PDO::FETCH_BOTH 4.…
