I am just getting to grips with oop. I am rewriting an ecommerce site to use it, and there are some cases when i don't know whether to use a class or just keep calling a function/include.
For example, inserting the google analytics code. To insert a chunk of code like that (something that will never change, and will never be inherited from) is a class the best
option, or an include, or a function?. Which takes the least processing?
Another example - i have a function, checkSession which returns the value of a session var or false. Presumably a quick lookup like that should remain a stand-alone function?