PHP cleanup के लिए finally block क्यों उपयोगी है? में developers की common mistake क्या है?

Other Published Updated 0 Views Verified
PHP cleanup के लिए finally block क्यों उपयोगी है? में developers की common mistake क्या है? सही विकल्प चुनें और code/solution को समझें।
Looking for the latest Sarkari Result 2026 updates? Check the latest government exam results, merit lists and result updates on Sarkari Resultess.
Sarkari Resultess
Questions & Answers

Answer & Explanation

4 Answers
Verified

finally runs only when no exception

finally runs only when no exception
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Sarkari Resultess
Editorial Answer 1
Verified

finally only catches errors

finally only catches errors
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Sarkari Resultess
Editorial Answer 2
Verified

finally replaces try

finally replaces try
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Sarkari Resultess
Editorial Answer 3
Verified Correct Answer

try { work(); } finally { cleanup(); }

try { work(); } finally { cleanup(); }
Additional Explanation
finally cleanup को success/error paths में execute करने के लिए उपयोगी है।
Sarkari Resultess
Editorial Answer 4