title: Force result for empty() test on an object
body: <p>Simple class for example:</p>
  
  <pre><code>class Foo
  {
      protected $_bar;
  
      public function setBar( $value ) {
  
          $this-&gt;_bar = $value;
  
      }
  
  }
  </code></pre>
  
  <p>And here is the question:</p>
  
  <pre><code>$obj = new Foo();
  
    var_dump( empty( $obj ) );  // true
  
  $obj-&gt;setBar( 'foobar' );
  
    var_dump( empty( $obj ) );  // false
  </code></pre>
  
  <p>Is it possible to change class's behaviour with testing it with <code>empty()</code> function so it will returns <code>true</code> when object is not filled with data ?</p>
  
  <p>I know about magic function <code>__isset( $name )</code> but it is called only when we test specific field like:</p>
  
  <pre><code>empty( $obj-&gt;someField );
  </code></pre>
  
  <p>but not when test whole object.</p>