title: PHP - Unable to implement the same interface twice
body: <p>I am trying to Implement an interface twice which extends another interface but unable to figure out why i am getting a <strong>Fatal Error</strong></p>
  
  <p>Here's my code:</p>
  
  <pre><code>interface a {
      public function foo();
  }
  
  interface b extends a {
      public function baz(Baz $baz);
  }
  
  // This will work
  class c implements b {
      public function foo() {
      }
  
      public function baz(Baz $baz) {
      }
  }
  
  // This will not work and result in a fatal error
  class d implements b {
      public function foo() {
      }
  
      public function baz(Foo $foo) {
      }
  }
  </code></pre>
  
  <p>I am getting this error message:</p>
  
  <p><strong>Fatal error: Declaration of d::baz() must be compatible with b::baz(Baz $baz) in K:\xampp\htdocs\oop\Lec 2\index.php on line 26</strong></p>