note 112529 added to language.exceptions

From: Date: Wed, 26 Jun 2013 14:08:25 +0000
Subject: note 112529 added to language.exceptions
Groups: php.notes 
Request: Send a blank email to php-notes+get-195363@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/112529 Del: integrated -- https://master.php.net/note/delete/112529/integrated Del: useless -- https://master.php.net/note/delete/112529/useless Del: bad code -- https://master.php.net/note/delete/112529/bad+code Del: spam -- https://master.php.net/note/delete/112529/spam Del: non-english -- https://master.php.net/note/delete/112529/non-english Del: in docs -- https://master.php.net/note/delete/112529/in+docs Del: other reasons-- https://master.php.net/note/delete/112529 Reject -- https://master.php.net/note/reject/112529 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195363) next »