title: Switch by class (instanceof) in PHP
body: <p>It is possible to replace block of <code>if( .. instanceof ...), elseif(... instanceof ...), ...</code>  with switch?</p>
  
  <p>For example:</p>
  
  <pre><code>&lt;?php
  $class = ..... //some class
  
  if($class instanceof SomeClass) {
      //do something
  } elseif($class instanceof SomeAnotherClass) {
      //do something else
  }
  </code></pre>