note 112528 added to language.exceptions

From: Date: Wed, 26 Jun 2013 14:06:42 +0000
Subject: note 112528 added to language.exceptions
Groups: php.notes 
Request: Send a blank email to php-notes+get-195362@lists.php.net to get a copy of this message
Just an example why finally blocks are usefull (5.5) <?php //without catch function example() { try { //do something that throws an exeption } finally { //this code will be executed even when the exception is executed } } function example2() { try { //open sql connection check user as example if(condition) { return false; } } finally { //close the sql connection, this will be executed even if the return is called. } } ?> ---- Server IP: 91.199.167.223 Probable Submitter: 95.97.155.20 ---- Manual Page -- http://php.net/manual/en/language.exceptions.php Edit -- https://master.php.net/note/edit/112528 Del: integrated -- https://master.php.net/note/delete/112528/integrated Del: useless -- https://master.php.net/note/delete/112528/useless Del: bad code -- https://master.php.net/note/delete/112528/bad+code Del: spam -- https://master.php.net/note/delete/112528/spam Del: non-english -- https://master.php.net/note/delete/112528/non-english Del: in docs -- https://master.php.net/note/delete/112528/in+docs Del: other reasons-- https://master.php.net/note/delete/112528 Reject -- https://master.php.net/note/reject/112528 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195362) next »