note 33521 added to language.operators.logical
| From: | php-general at lists dot php dot net | Date: | Sun, 29 Jun 2003 01:12:37 +0000 |
| Subject: | note 33521 added to language.operators.logical | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-51160@lists.php.net to get a copy of this message | ||
in answer to braintreno:
The second example you brought is the correct way to do it! It is not convoluted logic at all, it is
what makes your code readable by not relying on obscure side effects!! It is much easier to read
than the first one and it is by far easier to maintain.
For the idea to let a CheckThisOrOther() funtion echo information to the user alone, you should be
stripped of your coding licence. If i ever had to maintain on of your scripts, I'd have to hate
you.
This is not meant as flame bating as it might sound! Source code is not written for computers to
execute, but for coders to read! Keep that at heart and your co-workers will thank you for it!
----
Manual Page -- http://www.php.net/manual/en/language.operators.logical.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33521
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33521&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33521&report=yes