Which way is better to call a function static way or object way ?

anaelsCreathe

New Member
Hi
I'm new to OOPS, Can you guys suggest me which way is better to call a function of a class in PHP and why? the scenario is as follows.\[code\]class A{ function B (){}}\[/code\]Which method will take less resource to call the function B\[code\]1. A::B();\[/code\]or \[code\]2. $obj = new A(); $obj->B();\[/code\]
 
Back
Top