note 73485 deleted from language.types.boolean by danbrown
| From: | danbrown@php.net | Date: | Thu, 18 Jun 2009 14:11:31 +0000 |
| Subject: | note 73485 deleted from language.types.boolean by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157083@lists.php.net to get a copy of this message | ||
Note Submitter: andy at txtnation dot com
----
Re: comment from jasper at jtey dot com
It is better to not explicitly test for default values. PHP knows the default values, and so should
any programmer worth her/his salt.
Same example rewritten:
<?php
$num = 10;
$isEven = !($num % 2);
?>
The braces are off course optional.