Does anyone know if OO and php classes are more resource consuming than normal functions that have the same result.
And is there a simple php script that can give me exact RAM and CPU consumption by any given script so that I can monitor and limit resources usage, to code better for shared hosting.
Thank You.
Whether they differ in resource consumption is unimportant. You do not pick one over the other for matters of performance but for the paradigm.
For benchmarking and profiling, you can use XDebug and
memory_get_usageandmemory_get_peak_usage. You might also be interested in ab and similar tools.