Still on the PHP-OOP tutorial wheels, this question may belong to failblog.org . =)
What are the advantages of the method chain in PHP?
I'm not sure if this is important, but I will call my method statically. eg.
$foo = Bar::get('sysop')->set('admin')->render();
From what I read, any method that returns $thiscan be bound. I just found out that this is new in PHP5. It seems to me that there may be speed benefits if I do not need to instantiate a new object (set it statically) and just select several methods that I need from the class?
Do I have this right?
source
share