[ PHP Programming MCQS ]
झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।
[ PHP Programming MCQS ]
Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
91. Laravel में environment variables किस file में रखी जाती हैं?
[A] config.php
[B] .env
[C] app.php
[D] laravel.env
91. In which file are Laravel environment variables stored?
[A] config.php
[B] .env
[C] app.php
[D] laravel.env
सही उत्तर: .env
व्याख्या: Application configuration के लिए।
Correct Answer: .env
Explanation: Used for application configuration.
92. Caching का मुख्य उद्देश्य क्या है?
[A] Security
[B] Performance Improve करना
[C] Delete Data
[D] Create Tables
92. What is the primary purpose of caching?
[A] Security
[B] Improve Performance
[C] Delete Data
[D] Create Tables
सही उत्तर: Performance Improve करना
व्याख्या: Response time कम करता है।
Correct Answer: Improve Performance
Explanation: Reduces response time.
93. Laravel cache clear करने का command क्या है?
[A] php artisan cache:clear
[B] php artisan clear
[C] php artisan cache:remove
[D] php artisan cache:delete
93. Which command clears Laravel cache?
[A] php artisan cache:clear
[B] php artisan clear
[C] php artisan cache:remove
[D] php artisan cache:delete
सही उत्तर: php artisan cache:clear
व्याख्या: Application cache clear करता है।
Correct Answer: php artisan cache:clear
Explanation: Clears application cache.
94. Laravel में authentication scaffold उपलब्ध कराने के लिए commonly कौन-सा package उपयोग होता है?
[A] Laravel Breeze
[B] PHPExcel
[C] Monolog
[D] Guzzle
94. Which package commonly provides authentication scaffolding in Laravel?
[A] Laravel Breeze
[B] PHPExcel
[C] Monolog
[D] Guzzle
सही उत्तर: Laravel Breeze
व्याख्या: Simple authentication scaffolding प्रदान करता है।
Correct Answer: Laravel Breeze
Explanation: Provides simple authentication scaffolding.
95. PHP में trait import करने के लिए कौन-सा keyword प्रयोग होता है?
[A] extends
[B] implements
[C] use
[D] import
95. Which keyword imports a trait in PHP?
[A] extends
[B] implements
[C] use
[D] import
सही उत्तर: use
व्याख्या: Class के अंदर trait शामिल करने के लिए।
Correct Answer: use
Explanation: Used inside class to include a trait.
96. PHP में interface कितनी classes द्वारा implement किया जा सकता है?
[A] 1
[B] 2
[C] 5
[D] Unlimited
96. How many classes can implement an interface?
[A] 1
[B] 2
[C] 5
[D] Unlimited
सही उत्तर: Unlimited
व्याख्या: कई classes एक ही interface implement कर सकती हैं।
Correct Answer: Unlimited
Explanation: Multiple classes can implement the same interface.
97. SOLID principles में S का अर्थ क्या है?
[A] Single Responsibility Principle
[B] Simple Rule Principle
[C] Secure Responsibility Principle
[D] Source Rule Principle
97. What does S stand for in SOLID?
[A] Single Responsibility Principle
[B] Simple Rule Principle
[C] Secure Responsibility Principle
[D] Source Rule Principle
सही उत्तर: Single Responsibility Principle
व्याख्या: एक class का केवल एक responsibility होना चाहिए।
Correct Answer: Single Responsibility Principle
Explanation: A class should have only one responsibility.
98. PHP में strict typing enable करने के लिए कौन-सा declaration प्रयोग होता है?
[A] declare(strict_types=1);
[B] strict=1;
[C] type_strict=1;
[D] typing=1;
98. Which declaration enables strict typing in PHP?
[A] declare(strict_types=1);
[B] strict=1;
[C] type_strict=1;
[D] typing=1;
सही उत्तर: declare(strict_types=1);
व्याख्या: Strict type checking enable करता है।
Correct Answer: declare(strict_types=1);
Explanation: Enables strict type checking.
99. PHP 8 में introduced Match Expression का मुख्य लाभ क्या है?
[A] Database Access
[B] Cleaner Conditional Logic
[C] File Upload
[D] Session Storage
99. What is the main advantage of PHP 8 Match Expression?
[A] Database Access
[B] Cleaner Conditional Logic
[C] File Upload
[D] Session Storage
सही उत्तर: Cleaner Conditional Logic
व्याख्या: Switch statement का आधुनिक विकल्प।
Correct Answer: Cleaner Conditional Logic
Explanation: Modern alternative to switch statement.
100. Singleton Design Pattern का मुख्य उद्देश्य क्या है?
[A] Multiple Objects बनाना
[B] एक ही Object Instance रखना
[C] Database Create करना
[D] File Upload करना
100. What is the main purpose of Singleton Pattern?
[A] Create Multiple Objects
[B] Maintain Single Instance
[C] Create Database
[D] Upload Files
सही उत्तर: एक ही Object Instance रखना
व्याख्या: पूरे application में class का केवल एक instance रहता है।
Correct Answer: Maintain Single Instance
Explanation: Ensures only one instance exists throughout application.