[ PHP Programming MCQS ]
झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।
[ PHP Programming MCQS ]
Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
421. PHP Code: echo gettype(100); Output क्या होगा?
[A] string
[B] float
[C] integer
[D] array
421. PHP Code: echo gettype(100); What is the output?
[A] string
[B] float
[C] integer
[D] array
सही उत्तर: integer
व्याख्या: 100 integer type है।
Correct Answer: integer
Explanation: 100 is of integer type.
422. PHP Code: echo is_array([1,2]); Output क्या होगा?
[A] 0
[B] false
[C] 1
[D] array
422. PHP Code: echo is_array([1,2]); What is the output?
[A] 0
[B] false
[C] 1
[D] array
सही उत्तर: 1
व्याख्या: is_array() true होने पर 1 print करता है।
Correct Answer: 1
Explanation: Returns 1 when true.
423. PHP Code: echo strtolower("PHP"); Output क्या होगा?
[A] PHP
[B] php
[C] Php
[D] pHp
423. PHP Code: echo strtolower("PHP"); What is the output?
[A] PHP
[B] php
[C] Php
[D] pHp
सही उत्तर: php
व्याख्या: strtolower() lowercase में convert करता है।
Correct Answer: php
Explanation: Converts string to lowercase.
424. PHP Code: echo strtoupper("php"); Output क्या होगा?
[A] php
[B] Php
[C] PHP
[D] pHP
424. PHP Code: echo strtoupper("php"); What is the output?
[A] php
[B] Php
[C] PHP
[D] pHP
सही उत्तर: PHP
व्याख्या: strtoupper() uppercase में convert करता है।
Correct Answer: PHP
Explanation: Converts string to uppercase.
425. PHP Code: echo ucfirst("php"); Output क्या होगा?
[A] PHP
[B] Php
[C] php
[D] pHP
425. PHP Code: echo ucfirst("php"); What is the output?
[A] PHP
[B] Php
[C] php
[D] pHP
सही उत्तर: Php
व्याख्या: पहला character uppercase बनता है।
Correct Answer: Php
Explanation: Converts first character to uppercase.
426. PHP Code: echo lcfirst("PHP"); Output क्या होगा?
[A] pHP
[B] php
[C] Php
[D] PHP
426. PHP Code: echo lcfirst("PHP"); What is the output?
[A] pHP
[B] php
[C] Php
[D] PHP
सही उत्तर: pHP
व्याख्या: पहला character lowercase बनता है।
Correct Answer: pHP
Explanation: Converts first character to lowercase.
427. PHP Code: class A{public static $x=5;} echo A::$x; Output क्या होगा?
[A] 0
[B] 5
[C] Error
[D] NULL
427. PHP Code: class A{public static $x=5;} echo A::$x; What is the output?
[A] 0
[B] 5
[C] Error
[D] NULL
सही उत्तर: 5
व्याख्या: Static property class name से access होती है।
Correct Answer: 5
Explanation: Static property is accessed using class name.
428. PHP में __destruct() method कब execute होती है?
[A] Object Creation पर
[B] Object Destroy होने पर
[C] Page Load पर
[D] Function Call पर
428. When is __destruct() executed in PHP?
[A] On Object Creation
[B] On Object Destruction
[C] On Page Load
[D] On Function Call
सही उत्तर: Object Destroy होने पर
व्याख्या: Object lifecycle के अंत में execute होती है।
Correct Answer: On Object Destruction
Explanation: Executed at the end of object lifecycle.
429. PHP में __get() magic method कब call होती है?
[A] Private/Undefined Property Access पर
[B] Object Creation पर
[C] Session Start पर
[D] Array Access पर
429. When is __get() called in PHP?
[A] On Private/Undefined Property Access
[B] On Object Creation
[C] On Session Start
[D] On Array Access
सही उत्तर: Private/Undefined Property Access पर
व्याख्या: Inaccessible property access होने पर call होती है।
Correct Answer: On Private/Undefined Property Access
Explanation: Called when accessing inaccessible properties.
430. PHP में __set() magic method कब call होती है?
[A] Property Assignment पर
[B] Object Delete पर
[C] Array Creation पर
[D] Function Call पर
430. When is __set() called in PHP?
[A] On Property Assignment
[B] On Object Deletion
[C] On Array Creation
[D] On Function Call
सही उत्तर: Property Assignment पर
व्याख्या: Inaccessible property assign होने पर call होती है।
Correct Answer: On Property Assignment
Explanation: Called when assigning inaccessible properties.