[ PHP Programming MCQS ]

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

[ PHP Programming MCQS ]

Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
251. Closure में external variable import करने के लिए कौन-सा keyword प्रयोग होता है?
[A] with
[B] import
[C] use
[D] global
251. Which keyword imports external variables into a Closure?
[A] with
[B] import
[C] use
[D] global
सही उत्तर: use
व्याख्या: Closure के अंदर बाहरी variable access करने के लिए।
Correct Answer: use
Explanation: Used to access outer variables inside closures.
252. Generator बनाने के लिए कौन-सा keyword प्रयोग होता है?
[A] return
[B] generate
[C] yield
[D] iterator
252. Which keyword is used to create a Generator?
[A] return
[B] generate
[C] yield
[D] iterator
सही उत्तर: yield
व्याख्या: Memory efficient iteration के लिए।
Correct Answer: yield
Explanation: Used for memory-efficient iteration.
253. Generator का मुख्य लाभ क्या है?
[A] More Memory Usage
[B] Less Memory Usage
[C] Database Speed
[D] Session Handling
253. What is the main benefit of Generators?
[A] More Memory Usage
[B] Less Memory Usage
[C] Database Speed
[D] Session Handling
सही उत्तर: Less Memory Usage
व्याख्या: बड़े datasets पर कम memory उपयोग करता है।
Correct Answer: Less Memory Usage
Explanation: Uses less memory with large datasets.
254. PHP में Traversable interface किसलिए प्रयोग होता है?
[A] Database Access
[B] Object Iteration
[C] Encryption
[D] Authentication
254. What is Traversable interface used for?
[A] Database Access
[B] Object Iteration
[C] Encryption
[D] Authentication
सही उत्तर: Object Iteration
व्याख्या: Objects को foreach में iterate करने हेतु।
Correct Answer: Object Iteration
Explanation: Allows objects to be iterated.
255. Iterator interface में current() method क्या return करता है?
[A] Current Element
[B] Next Element
[C] Previous Element
[D] Array Size
255. What does current() method return in Iterator?
[A] Current Element
[B] Next Element
[C] Previous Element
[D] Array Size
सही उत्तर: Current Element
व्याख्या: Current position का value return करता है।
Correct Answer: Current Element
Explanation: Returns the current element value.
256. Iterator interface में next() method का कार्य क्या है?
[A] Previous Position
[B] Current Position
[C] Move Forward
[D] Reset Pointer
256. What does next() method do in Iterator?
[A] Previous Position
[B] Current Position
[C] Move Forward
[D] Reset Pointer
सही उत्तर: Move Forward
व्याख्या: Pointer को अगले element पर ले जाता है।
Correct Answer: Move Forward
Explanation: Moves pointer to the next element.
257. SPL का पूरा नाम क्या है?
[A] Simple PHP Library
[B] Standard PHP Library
[C] System PHP Layer
[D] Server PHP Library
257. What is the full form of SPL?
[A] Simple PHP Library
[B] Standard PHP Library
[C] System PHP Layer
[D] Server PHP Library
सही उत्तर: Standard PHP Library
व्याख्या: PHP के built-in classes और interfaces का संग्रह।
Correct Answer: Standard PHP Library
Explanation: Collection of built-in PHP classes and interfaces.
258. SplStack किस data structure को implement करता है?
[A] Queue
[B] Stack
[C] Tree
[D] Graph
258. Which data structure does SplStack implement?
[A] Queue
[B] Stack
[C] Tree
[D] Graph
सही उत्तर: Stack
व्याख्या: LIFO structure प्रदान करता है।
Correct Answer: Stack
Explanation: Provides a LIFO structure.
259. SplQueue किस data structure को implement करता है?
[A] Stack
[B] Queue
[C] Tree
[D] Set
259. Which data structure does SplQueue implement?
[A] Stack
[B] Queue
[C] Tree
[D] Set
सही उत्तर: Queue
व्याख्या: FIFO structure प्रदान करता है।
Correct Answer: Queue
Explanation: Provides a FIFO structure.
260. Reflection API का मुख्य उद्देश्य क्या है?
[A] Database Access
[B] Runtime Inspection
[C] Caching
[D] Routing
260. What is the purpose of Reflection API?
[A] Database Access
[B] Runtime Inspection
[C] Caching
[D] Routing
सही उत्तर: Runtime Inspection
व्याख्या: Classes, methods और properties की जानकारी runtime पर प्राप्त करना।
Correct Answer: Runtime Inspection
Explanation: Allows runtime inspection of classes and methods.