performance - Include all functions in the php file I need or just the functions I need? -


so here want do.

  1. 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.

  2. 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

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -