performance - Include all functions in the php file I need or just the functions I need? -
so here want do.
the first option write each function in different php file each 1 , include of them in php file called include functions.php , whenever create new page , let's index.php include "functions.php";
why need that? because i'll have include 1 file , functions included. problem server load. i'm not sure how uncalled functions affect performance.
the second option create again files need, team them , whenever need function call it. drawback of i'll have more work in order categorize , i'll have include lot of files
so want ask, first option increase cpu , memory load have go second one? there performance issues first way or functions not being used not parsed @ php ?
disk slowest part of server, in case variant "all functions in 1 file" give little more performance, theoretically.
but don't recommend create "functions.php", better way oop. create classes (objects) methods, use autoloaders , psr-0 standard , forget "include" , "require" @ all.
Comments
Post a Comment