memory - All PHP functions in one class and server issues -


this first time use php oop in programming website.

i created 1 class (in 1 file), , added functions under class. file has 30 functions, more 2000 line of code. read many discussions separating classes in categorized files, of discussions (as understood) point 1 main benefit; it’s ease of maintenance of code.

if benefit, prefer keep functions in 1 class, easier me: call class once in header , use functions 1 line or more. makes me worried, cpu, memory , other server resources usage.

my question is: okay use 1 class/file functions, or affect server resource negatively? until now, test code on localhost, fine, afraid different in real world.

to answer question: no not affect server-resources negatively. (atleast not enough care)

to give advice: - in implementation gain nothing using class compared bunch of functions. - if interested in oop, on right track more research on class/object , how use it.


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -