SarkariResultess QA Bank

PHP `isset()` और `array_key_exists()` में basic difference क्या है? में error आए तो solution क्या है?

Other 0 Views Verified
PHP `isset()` और `array_key_exists()` में basic difference क्या है? में error आए तो solution क्या है? सही विकल्प चुनें और code/solution को समझें।
Sarkari Result QA Bank
Editorially reviewed exam information

Answer & Explanation

4 Answers
Verified

isset केवल classes पर चलता है

isset केवल classes पर चलता है
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified Correct Answer

isset() null पर false हो सकता है; array_key_exists() key मौजूद होने पर true देता है, even if value null है

isset() null पर false हो सकता है; array_key_exists() key मौजूद होने पर true देता है, even if value null है
Additional Explanation
Null-valued keys के लिए यह distinction महत्वपूर्ण है। पहले exact error message, line number और input value check करें।
Verified

दोनों हमेशा identical हैं

दोनों हमेशा identical हैं
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified

array_key_exists केवल strings पर चलता है

array_key_exists केवल strings पर चलता है
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।