[ PHP Programming MCQS ]

झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।

[ PHP Programming MCQS ]

Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
471. Decorator Pattern का उद्देश्य क्या है?
[A] Add Behavior Dynamically
[B] Delete Objects
[C] Create Database
[D] Manage Sessions
471. What is the purpose of Decorator Pattern?
[A] Add Behavior Dynamically
[B] Delete Objects
[C] Create Database
[D] Manage Sessions
सही उत्तर: Add Behavior Dynamically
व्याख्या: Object functionality को runtime पर extend करता है।
Correct Answer: Add Behavior Dynamically
Explanation: Extends object functionality dynamically.
472. Adapter Pattern का मुख्य उपयोग क्या है?
[A] Interface Compatibility
[B] Session Sharing
[C] Caching
[D] File Storage
472. What is the main use of Adapter Pattern?
[A] Interface Compatibility
[B] Session Sharing
[C] Caching
[D] File Storage
सही उत्तर: Interface Compatibility
व्याख्या: Incompatible interfaces को साथ काम करने देता है।
Correct Answer: Interface Compatibility
Explanation: Allows incompatible interfaces to work together.
473. Facade Pattern का उद्देश्य क्या है?
[A] Simplified Interface
[B] Complex Interface
[C] Database Backup
[D] Session Management
473. What is the purpose of Facade Pattern?
[A] Simplified Interface
[B] Complex Interface
[C] Database Backup
[D] Session Management
सही उत्तर: Simplified Interface
व्याख्या: Complex subsystem के लिए simple interface प्रदान करता है।
Correct Answer: Simplified Interface
Explanation: Provides a simple interface to a complex subsystem.
474. Prototype Pattern किसलिए उपयोग किया जाता है?
[A] Object Cloning
[B] Object Deletion
[C] Database Replication
[D] Session Cloning
474. What is Prototype Pattern used for?
[A] Object Cloning
[B] Object Deletion
[C] Database Replication
[D] Session Cloning
सही उत्तर: Object Cloning
व्याख्या: Existing object clone करके नए objects बनाता है।
Correct Answer: Object Cloning
Explanation: Creates new objects by cloning existing ones.
475. Visitor Pattern का मुख्य लाभ क्या है?
[A] Add Operations Without Modifying Classes
[B] Increase Coupling
[C] Reduce Security
[D] Manage Sessions
475. What is the main benefit of Visitor Pattern?
[A] Add Operations Without Modifying Classes
[B] Increase Coupling
[C] Reduce Security
[D] Manage Sessions
सही उत्तर: Add Operations Without Modifying Classes
व्याख्या: Classes बदले बिना नए operations जोड़ सकते हैं।
Correct Answer: Add Operations Without Modifying Classes
Explanation: Adds new operations without changing classes.
476. Chain of Responsibility Pattern का उद्देश्य क्या है?
[A] Pass Request Through Handlers
[B] Delete Requests
[C] Store Requests
[D] Encrypt Requests
476. What is the purpose of Chain of Responsibility Pattern?
[A] Pass Request Through Handlers
[B] Delete Requests
[C] Store Requests
[D] Encrypt Requests
सही उत्तर: Pass Request Through Handlers
व्याख्या: Request कई handlers से होकर गुजर सकती है।
Correct Answer: Pass Request Through Handlers
Explanation: Allows requests to pass through multiple handlers.
477. State Pattern किस समस्या का समाधान करता है?
[A] Behavior Based on State
[B] Database Scaling
[C] File Compression
[D] Session Creation
477. What problem does State Pattern solve?
[A] Behavior Based on State
[B] Database Scaling
[C] File Compression
[D] Session Creation
सही उत्तर: Behavior Based on State
व्याख्या: Object का behavior उसकी current state पर निर्भर करता है।
Correct Answer: Behavior Based on State
Explanation: Changes behavior based on object state.
478. Template Method Pattern का मुख्य उद्देश्य क्या है?
[A] Define Algorithm Skeleton
[B] Create Sessions
[C] Store Files
[D] Optimize Queries
478. What is the main purpose of Template Method Pattern?
[A] Define Algorithm Skeleton
[B] Create Sessions
[C] Store Files
[D] Optimize Queries
सही उत्तर: Define Algorithm Skeleton
व्याख्या: Algorithm structure define करता है जबकि steps subclasses implement करती हैं।
Correct Answer: Define Algorithm Skeleton
Explanation: Defines algorithm structure while subclasses implement steps.
479. PHP JIT का पूरा नाम क्या है?
[A] Just In Time Compiler
[B] Java Integration Tool
[C] JSON Interface Technology
[D] Job Instruction Translator
479. What is the full form of PHP JIT?
[A] Just In Time Compiler
[B] Java Integration Tool
[C] JSON Interface Technology
[D] Job Instruction Translator
सही उत्तर: Just In Time Compiler
व्याख्या: PHP 8 में introduced feature जो runtime optimization करता है।
Correct Answer: Just In Time Compiler
Explanation: Feature introduced in PHP 8 for runtime optimization.
480. PHP में garbage collection का उद्देश्य क्या है?
[A] Unused memory reclaim करना
[B] Database optimize करना
[C] Images delete करना
[D] Sessions encrypt करना
480. What is the purpose of garbage collection in PHP?
[A] Reclaim unused memory
[B] Optimize database
[C] Delete images
[D] Encrypt sessions
सही उत्तर: Unused memory reclaim करना
व्याख्या: Unused objects और circular references को remove करता है।
Correct Answer: Reclaim unused memory
Explanation: Removes unused objects and circular references.