Re: Which is quicker, if-else statements
| From: | Liam Gibbs | Date: | Tue, 18 Mar 2003 20:47:17 +0000 |
| Subject: | Re: Which is quicker, if-else statements | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140207@lists.php.net to get a copy of this message | ||
> If you want clarity, why not:
>
> if($r == 0) {
> ...
> } else { // $r != 0
> }
Hmm. That's a good idea. Yeah, I was sure the else-if method wasn't faster.
I just wasn't sure if it was slower, or if that really mattered. But your
method seems fine, and I have no idea why I didn't think of that.