mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Improve example wrt. to CS
Patch provided by anon user. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@341918 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
cdf488a697
commit
f258d65696
1 changed files with 4 additions and 4 deletions
|
@ -69,17 +69,17 @@ if ($a > $b) {
|
|||
<?php
|
||||
|
||||
/* Incorrect Method: */
|
||||
if($a > $b):
|
||||
if ($a > $b):
|
||||
echo $a." is greater than ".$b;
|
||||
else if($a == $b): // Will not compile.
|
||||
else if ($a == $b): // Will not compile.
|
||||
echo "The above line causes a parse error.";
|
||||
endif;
|
||||
|
||||
|
||||
/* Correct Method: */
|
||||
if($a > $b):
|
||||
if ($a > $b):
|
||||
echo $a." is greater than ".$b;
|
||||
elseif($a == $b): // Note the combination of the words.
|
||||
elseif ($a == $b): // Note the combination of the words.
|
||||
echo $a." equals ".$b;
|
||||
else:
|
||||
echo $a." is neither greater than or equal to ".$b;
|
||||
|
|
Loading…
Reference in a new issue