note 75535 deleted from control-structures.break by tularis
| From: | tularis@php.net | Date: | Tue, 05 Jun 2007 06:30:10 +0000 |
| Subject: | note 75535 deleted from control-structures.break by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127208@lists.php.net to get a copy of this message | ||
Note Submitter: scampifries\\\ at ///beer\\\ dot ///com
Reason: useless
----
It should be noted that if you break out of a 'for' loop, the final expression is NOT
executed. e.g:
<?php
for($i=0; $i<100; $i++)
{
if($i==3)
break;
}
print $i; //3
?>
once the break statement is executed, the for loop is exited immediately. $i++ is not executed
again