php - Is calling a function in OOP slow or is it the overhead? -
this question has answer here:
- is object-oriented php slow? 11 answers
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
Post a Comment