Which is quicker, if-else statements
| From: | Liam Gibbs | Date: | Tue, 18 Mar 2003 20:02:13 +0000 |
| Subject: | Which is quicker, if-else statements | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-140173@lists.php.net to get a copy of this message | ||
Is it just as quick to do:
if($r == 0) {
} else if($r != 0) {
}
than to do:
if($r == 0) {
} else {
}
The reason I like the former method is because, in a large IF-ELSE block, it's clear what
belongs to what IF and what's going on. But does this make it lag? And, if so, is it really all
that noticeable?