title: Output a property with PHP5 and method chaining
body: <p>I am playing with PHP5 and method chaining, following several StackOverflow examples.
  I would like to set up a generic show() method able to print only the desired property, please see the example:</p>
  
  <pre><code>&lt;?php
  
  class testarea{
  
    public function set_a(){
      $this-&gt;property_a = 'this is a'.PHP_EOL;
      return $this;
    }
  
    public function set_b(){
      $this-&gt;property_b = 'this is b'.PHP_EOL;
      return $this;
    }
  
    public function show(){
     echo var_dump($this-&gt;property_a); // -&gt;... generalize this                                                                                                                     
     return $this;
    }
  
  }
  
  $ta=new testarea();
  
  $ta-&gt;set_a()-&gt;set_b();
  $ta-&gt;show();
  
  ?&gt;
  </code></pre>
  
  <p>This echoes <code>string(10) "this is a "</code>.</p>
  
  <p>What I would like to do is a generic show() method which shows only the property that the <code>set_a()</code> or the <code>set_b()</code> methods have setted.</p>
  
  <p>Is it possible?</p>