Hello. I have main php-file with main class. Also in this class i do require_once("func.php"); which has many useful functions for my site.
Size of func.php is very big, because there is many functions for different actions on different pages. But I include it on every page, because including called by main class. What I need to do for optimizing it?
Rewrite func.php to OOP and use in main class something like "$funcs->my_func()"? Will I won some performance? Functions which wasnt called would not occupy memory and CPU time?
Or I must rewrite func.php to many files and call each on specified page? For example: for "about.php" I will include "about_func.php" with needed functions. But it isnt comfortable I think...
Please, help me :) And sorry for my eng :)