optimal code
| From: | Adrian Ciutureanu | Date: | Thu, 05 Jul 2001 11:29:12 +0000 |
| Subject: | optimal code | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-56293@lists.php.net to get a copy of this message | ||
Is any of the versions below more effective?
/** Version 1 **/
<?
if($condition) {
// some big code
} else {
// other big code
}
?>
/** Version 2 **/
<?
if($condition) {
include 'file_with_some _big_code.php';
} else {
include 'file_with_other_big_code.php';
}
?>
/** Version 3 **/
<?
if($condition) {
require 'file_with_some _big_code.php';
} else {
require 'file_with_other_big_code.php';
}
?>