[ PHP Programming MCQS ]
झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।
[ PHP Programming MCQS ]
Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
11. PHP में object बनाने के लिए कौन-सा keyword प्रयोग होता है?
[A] create
[B] new
[C] object
[D] make
11. Which keyword is used to create an object in PHP?
[A] create
[B] new
[C] object
[D] make
सही उत्तर: new
व्याख्या: new keyword object बनाने के लिए।
Correct Answer: new
Explanation: new keyword is used to create objects.
12. PHP में inheritance के लिए कौन-सा keyword प्रयोग होता है?
[A] extends
[B] inherit
[C] implement
[D] parent
12. Which keyword is used for inheritance in PHP?
[A] extends
[B] inherit
[C] implement
[D] parent
सही उत्तर: extends
व्याख्या: Class inheritance के लिए extends प्रयोग होता है।
Correct Answer: extends
Explanation: extends is used for class inheritance.
13. PHP में interface implement करने के लिए कौन-सा keyword प्रयोग होता है?
[A] extends
[B] implements
[C] interface
[D] abstract
13. Which keyword is used to implement an interface in PHP?
[A] extends
[B] implements
[C] interface
[D] abstract
सही उत्तर: implements
व्याख्या: Interface को implements किया जाता है।
Correct Answer: implements
Explanation: Interfaces are implemented using implements.
14. PHP में abstract class बनाने के लिए कौन-सा keyword प्रयोग होता है?
[A] class
[B] abstract
[C] interface
[D] final
14. Which keyword is used to create an abstract class?
[A] class
[B] abstract
[C] interface
[D] final
सही उत्तर: abstract
व्याख्या: Abstract class abstract keyword से बनती है।
Correct Answer: abstract
Explanation: Abstract classes use abstract keyword.
15. PHP में exception handling के लिए कौन-सा block प्रयोग होता है?
[A] try-catch
[B] if-else
[C] switch
[D] loop
15. Which block is used for exception handling?
[A] try-catch
[B] if-else
[C] switch
[D] loop
सही उत्तर: try-catch
व्याख्या: Exception handling के लिए।
Correct Answer: try-catch
Explanation: Used for exception handling.
16. PHP में JSON encode करने के लिए कौन-सा function प्रयोग होता है?
[A] json_make()
[B] json_encode()
[C] encode_json()
[D] make_json()
16. Which function converts data to JSON?
[A] json_make()
[B] json_encode()
[C] encode_json()
[D] make_json()
सही उत्तर: json_encode()
व्याख्या: Array/Object को JSON में convert करता है।
Correct Answer: json_encode()
Explanation: Converts array/object to JSON.
17. PHP में JSON decode करने के लिए कौन-सा function प्रयोग होता है?
[A] json_decode()
[B] json_read()
[C] json_open()
[D] json_parse()
17. Which function decodes JSON?
[A] json_decode()
[B] json_read()
[C] json_open()
[D] json_parse()
सही उत्तर: json_decode()
व्याख्या: JSON को PHP array/object में बदलता है।
Correct Answer: json_decode()
Explanation: Converts JSON into PHP array/object.
18. PHP में file upload के लिए कौन-सा superglobal प्रयोग होता है?
[A] $_FILES
[B] $_UPLOAD
[C] $_FILES
[D] $_DATA
18. Which superglobal is used for file upload?
[A] $_FILES
[B] $_UPLOAD
[C] $_FILES
[D] $_DATA
सही उत्तर: $_FILES
व्याख्या: File upload data के लिए।
Correct Answer: $_FILES
Explanation: Used for uploaded files.
19. PHP में password hash करने के लिए कौन-सा function प्रयोग होता है?
[A] md5()
[B] sha1()
[C] password_hash()
[D] encrypt()
19. Which function is recommended for password hashing?
[A] md5()
[B] sha1()
[C] password_hash()
[D] encrypt()
सही उत्तर: password_hash()
व्याख्या: Secure password hashing के लिए।
Correct Answer: password_hash()
Explanation: Used for secure password hashing.
20. PHP में prepared statement का मुख्य लाभ क्या है?
[A] Speed
[B] Security
[C] Design
[D] Storage
20. What is the main advantage of prepared statements?
[A] Speed
[B] Security
[C] Design
[D] Storage
सही उत्तर: Security
व्याख्या: SQL Injection से बचाव।
Correct Answer: Security
Explanation: Protects against SQL Injection.