PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi,
I am new to PHP and am trying my hands on Object Oriented PHP. I need a little help on the symbol ->
I know how to use -> symbol. But I have seen some typical examples of it which I dont understand. Please check the following example and somebody tell me what actually it all means and what class structure it is used for:
Example::instance() returns an object. That object has a method called foo(). foo() also returns an object. That object has a method called bar(). bar() also returns an object... and so on.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.