[ PHP Programming MCQS ]
झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।
[ PHP Programming MCQS ]
Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
281. PHP Attribute declare करने के लिए कौन-सा syntax प्रयोग होता है?
[A] @Attribute
[B] #[Attribute]
[C]
[D] [Attribute]
281. Which syntax is used to declare PHP Attributes?
[A] @Attribute
[B] #[Attribute]
[C]
[D] [Attribute]
सही उत्तर: #[Attribute]
व्याख्या: Attributes square bracket syntax का उपयोग करते हैं।
Correct Answer: #[Attribute]
Explanation: Attributes use hash-square-bracket syntax.
282. Attributes का मुख्य उपयोग क्या है?
[A] Metadata Declaration
[B] Database Connection
[C] File Compression
[D] Session Storage
282. What is the main use of Attributes?
[A] Metadata Declaration
[B] Database Connection
[C] File Compression
[D] Session Storage
सही उत्तर: Metadata Declaration
व्याख्या: Classes, methods आदि पर metadata attach करने के लिए।
Correct Answer: Metadata Declaration
Explanation: Attach metadata to classes and methods.
283. PHP Enums किस version में introduce हुए?
[A] PHP 8.0
[B] PHP 8.1
[C] PHP 8.2
[D] PHP 7.4
283. In which PHP version were Enums introduced?
[A] PHP 8.0
[B] PHP 8.1
[C] PHP 8.2
[D] PHP 7.4
सही उत्तर: PHP 8.1
व्याख्या: Type-safe enumerations के लिए।
Correct Answer: PHP 8.1
Explanation: Introduced for type-safe enumerations.
284. Enum का मुख्य लाभ क्या है?
[A] Type Safety
[B] Faster Queries
[C] Smaller Files
[D] Session Sharing
284. What is the main benefit of Enums?
[A] Type Safety
[B] Faster Queries
[C] Smaller Files
[D] Session Sharing
सही उत्तर: Type Safety
व्याख्या: Valid predefined values सुनिश्चित करता है।
Correct Answer: Type Safety
Explanation: Ensures predefined valid values.
285. Backed Enum किस प्रकार की values रख सकता है?
[A] String या Integer
[B] Boolean Only
[C] Array Only
[D] Object Only
285. What values can a Backed Enum hold?
[A] String or Integer
[B] Boolean Only
[C] Array Only
[D] Object Only
सही उत्तर: String या Integer
व्याख्या: Backed Enums scalar values store करते हैं।
Correct Answer: String or Integer
Explanation: Backed enums store scalar values.
286. Readonly Properties किस version में introduce हुईं?
[A] PHP 8.0
[B] PHP 8.1
[C] PHP 8.2
[D] PHP 7.4
286. In which PHP version were Readonly Properties introduced?
[A] PHP 8.0
[B] PHP 8.1
[C] PHP 8.2
[D] PHP 7.4
सही उत्तर: PHP 8.1
व्याख्या: Immutable properties support के लिए।
Correct Answer: PHP 8.1
Explanation: Introduced for immutable properties.
287. Readonly Property को कितनी बार assign किया जा सकता है?
[A] Unlimited
[B] Two Times
[C] One Time
[D] Never
287. How many times can a Readonly Property be assigned?
[A] Unlimited
[B] Two Times
[C] One Time
[D] Never
सही उत्तर: One Time
व्याख्या: Initialization के बाद modify नहीं किया जा सकता।
Correct Answer: One Time
Explanation: Cannot be modified after initialization.
288. WeakMap का मुख्य उद्देश्य क्या है?
[A] Weak Object References
[B] Database Mapping
[C] Route Mapping
[D] Session Mapping
288. What is the main purpose of WeakMap?
[A] Weak Object References
[B] Database Mapping
[C] Route Mapping
[D] Session Mapping
सही उत्तर: Weak Object References
व्याख्या: Objects के garbage collection को allow करता है।
Correct Answer: Weak Object References
Explanation: Allows garbage collection of objects.
289. Dependency Injection Container का कार्य क्या है?
[A] Manage Dependencies
[B] Manage Sessions
[C] Manage Files
[D] Manage CSS
289. What does a Dependency Injection Container do?
[A] Manage Dependencies
[B] Manage Sessions
[C] Manage Files
[D] Manage CSS
सही उत्तर: Manage Dependencies
व्याख्या: Objects और dependencies create एवं resolve करता है।
Correct Answer: Manage Dependencies
Explanation: Creates and resolves object dependencies.
290. PSR-4 किससे संबंधित है?
[A] Autoloading Standard
[B] Database Standard
[C] Session Standard
[D] Encryption Standard
290. PSR-4 is related to?
[A] Autoloading Standard
[B] Database Standard
[C] Session Standard
[D] Encryption Standard
सही उत्तर: Autoloading Standard
व्याख्या: Namespaces आधारित autoloading।
Correct Answer: Autoloading Standard
Explanation: Namespace-based autoloading standard.