There is a cycle:

foreach(array('1.php', '2.php', '3.php') as $require_file) { require_once($require_file); } 

Question: Is there a possibility of increasing server load and reducing the performance of the system as a whole, or vice versa?

    2 answers 2

    Is there any chance of increasing server load?

    Excuse me, compared to what?

    Connect 5 files separately or 5 files in a loop? No, there will be no difference. Look also towards the autoloader.

    • in the connection file connection 5 files separately! - Palmervan
    • Plus, it is necessary to take into account the fact that require_once produces a fatal eror when there is no file, so that the cycle can be interrupted further - Maksym Prus
    • @ROOT file missing already, die (); - Palmervan
    • >> in the connection connection of 5 files separately! No, there will be no difference in performance. - Alex Kapustin
    • Satisfied with the answer, thank you) - Palmervan

    In the cycle, the load, of course, will be higher (for fans who want to save on matches, by one match). But if you want to really reduce the load, use require instead of require_once or write your own function to check the connected files.