note 119068 deleted from control-structures.if by peehaa
| From: | peehaa@php.net | Date: | Wed, 12 Oct 2016 13:15:29 +0000 |
| Subject: | note 119068 deleted from control-structures.if by peehaa | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-206851@lists.php.net to get a copy of this message | ||
Note Submitter: marki at trash-mail dot com
----
Why can't we quit an if block?
What's funny is that PHP has "goto", allows to include() stuff (from which you can
"return"), etc.etc., but you can't just quit an if-block but must resort to hacks
like
<?php
if($bla) { do{
$bla = get_bla();
if(empty($bla)) break;
...
} while(false); }
?>