SHARE
TWEET

Untitled

hamjoricantiq Feb 24th, 2020 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     interface a {
  3.         public function foo();
  4.     }
  5.  
  6.     interface b extends a {
  7.         public function baz(Baz $baz);
  8.     }
  9.  
  10.     // This will work
  11.     class c implements b {
  12.         public function foo() {
  13.  
  14.         }
  15.  
  16.         public function baz(Baz $baz) {
  17.  
  18.         }
  19.     }
  20.  
  21.     // This will not work and result in a fatal error
  22.     class d implements b {
  23.         public function foo() {
  24.  
  25.         }
  26.  
  27.         public function baz(Foo $foo) {
  28.            
  29.         }
  30.     }
  31. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top