📲 Download Utility Tools Apps

EMI Calculator

Download EMI Calculator

SOA Games

Download SOA Games

SOA Technology App

Download SOA Technology

BMI Checker

Download BMI Checker

Task Jira

Download Task Jira

Laughing Adda

Download Laughing Adda

📅 हिंदी कैलेंडर ऐप डाउनलोड करें

Download Shubhcalendar App

Coding-Based Practical Exam (Real-World Level)

💻 Practical Exam: Composer & PHP Packages

⏱ Duration: 2–3 Hours

🎯 Objective: Test real-world Composer usage


🟢 Section A: Setup (Basic – 10 Marks)

✅ Task 1:

  • Create a new project folder: composer-exam
  • Initialize Composer:
composer init

✅ Task 2:

  • Install these packages:
composer require monolog/monolog
composer require guzzlehttp/guzzle
composer require phpmailer/phpmailer

👉 Evaluation:

  • composer.json created ✔
  • vendor/ folder exists ✔

🟡 Section B: Logging System (20 Marks)

✅ Task:

Create a file: logger.php

👉 Requirements:

  • Use Monolog
  • Log messages into logs/app.log
  • Add:
    • INFO → “User visited site”
    • WARNING → “Invalid login attempt”
    • ERROR → “System failure”

👉 Expected Skills:

  • Autoload usage
  • Package integration

🟡 Section C: API Integration (20 Marks)

✅ Task:

Create api.php

👉 Requirements:

  • Use Guzzle
  • Fetch data from:
https://jsonplaceholder.typicode.com/users

👉 Output:

  • Display:
    • Name
    • Email
  • Show only first 3 users

👉 Bonus:

  • Handle API error (try-catch)

🟠 Section D: Email System (20 Marks)

✅ Task:

Create mail.php

👉 Requirements:

  • Use PHPMailer
  • Send test email

Fields:

👉 Bonus:

  • Use SMTP configuration

🔴 Section E: Autoloading (15 Marks)

✅ Task:

Implement PSR-4 Autoloading

👉 Step 1: Update composer.json

{
"autoload": {
"psr-4": {
"App\\": "src/"
}
}
}

👉 Step 2:

composer dump-autoload

👉 Step 3:
Create:

📁 src/User.php

namespace App;class User {
public function getName() {
return "Aditya";
}
}

👉 Step 4:
Use it in index.php


🔴 Section F: Mini Project (15 Marks)

✅ Build: Simple Contact Form System

👉 Requirements:

  • HTML form:
    • Name
    • Email
    • Message
  • On submit:
    • Log request (Monolog)
    • Send email (PHPMailer)

👉 Bonus:

  • Validate inputs

🧠 Section G: Debugging (Bonus – 10 Marks)

Scenario:

  • Delete vendor/ folder

👉 Task:

  • Restore project using Composer

✔ Expected command:

composer install

📊 Marking Scheme

SectionMarks
Setup10
Logging20
API20
Email20
Autoloading15
Mini Project15
Bonus10

🎯 Evaluation Criteria

  • ✔ Proper Composer usage
  • ✔ Clean code
  • ✔ Error handling
  • ✔ File structure
  • ✔ Real-world logic

📁 Expected Folder Structure

composer-exam/

├── composer.json
├── vendor/
├── index.php
├── logger.php
├── api.php
├── mail.php
├── src/
│ └── User.php
├── logs/
│ └── app.log

🚀 Pro-Level Challenge (Optional)

👉 Add:

  • .env file for config
  • Use vlucas/phpdotenv


AI Spiritual Tools & Interactive Experiences

Explore powerful AI-driven tools for daily guidance, spirituality, fun quizzes, and self-discovery.

Today’s Quote

Get inspiring daily quotes powered by AI to motivate and guide your day.

Explore Now

AI Tarot Card Reader

Reveal insights about your future, love, and career with AI tarot readings.

Read Tarot

Love Match Calculator

Check compatibility and love predictions using AI-based analysis.

Check Match

Fortune Cookie

Open an AI fortune cookie and receive wisdom, luck, and fun messages.

Open Cookie

Quiz Categories

Engage with knowledge-based and fun quizzes across multiple categories.

Start Quiz

Panchang Calendar

View daily Panchang, auspicious timings, tithi, nakshatra, and festivals.

View Panchang

Online Numerology

Discover your destiny number, life path, and numerology predictions.

Calculate Now

Spiritual Feeds

Stay connected with spiritual thoughts, mantras, and divine content.

View Feeds

Quiz Hub

Attempt trending quizzes on GK, spirituality, festivals, and more.

Explore Quizzes