OPTION A
index.php
<?php
my_function(){
//Code of 15 lines
}
//Other Codes
echo my_function();
//Other Codes
?>
OPTION B
function.php
<?php
my_function(){
//Code of 15 lines
}
?>
index.php
<?php
required_once 'function.php';
// Other Codes
echo my_function();
//Other Codes
?>
Which option (A/B) will be fast and consume less CPU Usage? Why?
Which one is better? (required_once
/ include_once
) Why?