title: Change the output by using a extending method in PHP
body: <p>Is it possible to do something like this in PHP?</p>
  
  <pre><code>Image::myMethod(); // returns array
  Image::myMethod()-&gt;toSring(); // Returns a string built inside the method toString
  </code></pre>
  
  <p>So, in other words, is there a way for PHP to detect if the method is being extended by another method if yes it then returns the <code>self/this</code>?</p>