title: Can you override interface methods with different, but "compatible", signatures?
body: <p>Consider the following PHP interfaces:</p>
  
  <pre><code>interface Item {
      // some methods here
  }
  
  interface SuperItem extends Item {
      // some extra methods here, not defined in Item
  }
  
  interface Collection {
      public function add(Item $item);
      // more methods here
  }
  
  interface SuperCollection extends Collection {
      public function add(SuperItem $item);
      // more methods here that "override" the Collection methods like "add()" does
  }
  </code></pre>
  
  <p>I'm using PHPStorm, and when I do this, I get an error in the IDE that basically states the definition for <code>add()</code> in <code>SuperCollection</code> is not compatible with the definition in the interface it extends, <code>Collection</code>.</p>
  
  <p>In one way, I can see this being a problem, as the signature of the method does not match the one it "overrides" <em>exactly</em>.  However, I do feel that this would be compatible, as <code>SuperItem</code> extends <code>Item</code>, so I would view <code>add(SuperItem)</code> the same as <code>add(Item)</code>.</p>
  
  <p>I'm curious as to if this is supported by PHP (version 5.4 or above), and maybe the IDE has a bug that doesn't properly catch this.</p>