title: typecasting in php
body: <p>I have an interface in PHP</p>
  
  <pre><code>interface IDummy{
  public function DoSomething();
  }
  </code></pre>
  
  <p>I have another class that implements this interface.</p>
  
  <pre><code>class Dummy implements IDummy{
  public function DoSomething(){
  
  }
  </code></pre>
  
  <p>How can I type cast the Dummy Object to IDummy in PHP, so that I can call it as </p>
  
  <pre><code>$dum = new Dummy();
  $instance = (IDummy)$dum;
  $instance-&gt;DoSomething();
  </code></pre>
  
  <p>Can I do this in PHP?</p>
  
  <p>Thanks and Regards
  Abishek R Srikaanth</p>