In php, it is valid to write something like this:
<?php
class Foo
{
public function bar()
{
return $this;
}
}
?>
How can I do this inside zend engine? I want a method to execute some operations, then return the class instance reference.
Furthermore, I would like to store some objects (from other classes) and return them as result of some other methods, should i store it's zval*
? What is the right way to return a reference to it?