OOP & PHP Runtime

Wednesday, November 4, 2015

I'm new to OOP & PHP. I've followed the OOP Approach as best I can so for each of the prominent "nouns" in my specification I have a class and this is working well.



But it got me thinking about compilation and runtime.



If I develop a comprehensive class, that has relevent properties, setters and getters and a series of methods, the resulting class could easily run into a couple of hundred lines of code.



If I then use this class, whereby (for example) I only call one method hasn't the whole class got to be parsed & converted and memory allocated before execution?



Have I got this right? As surely a procedural approach would be far more efficient (a function within an include) or is it that in real-world runtime this is negligable?

0 comments:

Post a Comment