php - Is calling a function in OOP slow or is it the overhead? -


this question has answer here:

i building application heavy repetition of functions.

for instance:

$class = new class; for($i; $i < 1000; $i++) {     $class->get_something(); } 

i have read many articles on oop , why slow, still don't understand "slow" part is. people keep using world "overhead," loading actual class? once require class, same speed when call function or variable?

you touching old debate between making 1 large query data, or looping on many smaller ones receive them. , answer lies in specifics of implementations. in cases faster call 1 function on , over, while other times kill performance. "overhead" calling function on , on pretty minimal, it's "guts" of matter.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -