note 108665 deleted from control-structures.if by danbrown
| From: | danbrown@php.net | Date: | Wed, 16 May 2012 13:44:42 +0000 |
| Subject: | note 108665 deleted from control-structures.if by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-188014@lists.php.net to get a copy of this message | ||
Note Submitter: cjnimes at yahoo dot com dot ar
----
@marcin_wo_wroc:
A much simpler and cleaner way to do that (one else for two ifs) is simply separate the conditions
with an "AND" operator:
<?php
if ( is_object($times) && (float)$times->getTime()>0 ) {
// ...
} else {
// ...
}
?>