note 76033 added to control-structures.elseif
| From: | rekcor at osu1 dot php dot net | Date: | Wed, 27 Jun 2007 09:24:45 +0000 |
| Subject: | note 76033 added to control-structures.elseif | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128018@lists.php.net to get a copy of this message | ||
Dont be so stupid (like me) to add a ';' after the elseif, as it will give unexpected
results:
<?php
/* this will output 'ab' in php4.3 */
$c=5;
if ($c>3)
{
echo 'a';
}
elseif($c>6);
{
echo 'b';
}
?>
----
Server IP: 194.109.193.76
Probable Submitter: 137.224.252.10
----
Manual Page -- http://www.php.net/manual/en/control-structures.elseif.php
Edit -- https://master.php.net/note/edit/76033
Del: integrated -- https://master.php.net/note/delete/76033/integrated
Del: useless -- https://master.php.net/note/delete/76033/useless
Del: bad code -- https://master.php.net/note/delete/76033/bad+code
Del: spam -- https://master.php.net/note/delete/76033/spam
Del: non-english -- https://master.php.net/note/delete/76033/non-english
Del: in docs -- https://master.php.net/note/delete/76033/in+docs
Del: other reasons-- https://master.php.net/note/delete/76033
Reject -- https://master.php.net/note/reject/76033
Search -- https://master.php.net/manage/user-notes.php