title: Pass an new undefined object extending an interface in php
body: <p>Does someone know if it is possible to pass an undefined object extending a defined interface in php into a function:</p>
  
  <p>For example something in this form:</p>
  
  <pre><code>callFunction(new InterfaceName {
  
      public function interfaceMethod() {
          // do something
      }
  
  });
  </code></pre>