Advertisement
sri211500

Untitled

Feb 25th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. <?php
  2. interface a
  3. {
  4. public funcation foo();
  5. }
  6.  
  7. interface b extends a
  8. {
  9. public funcation baz(baz $baz)
  10. }
  11.  
  12. //This will work
  13. class c implements b
  14. {
  15. public funcation foo()
  16. {
  17. }
  18.  
  19. public funcation baz(baz $baz)
  20. {
  21. }
  22. }
  23.  
  24. //This will not work and result in a fatal e
  25. class d implements b
  26. {
  27. public funcation foo()
  28. {
  29. }
  30.  
  31. public funcation baz(Foo $foo)
  32. {
  33. }
  34. }
  35.  
  36. interface a
  37. {
  38. public funcation foo();
  39. }
  40.  
  41. interface b
  42. {
  43. public funcation bar();
  44. }
  45.  
  46. interface c extends a, b
  47. {
  48. public funcationbaz();
  49. }
  50.  
  51. class d implements c
  52. {
  53. public funcation foo()
  54. {
  55. }
  56.  
  57. public funcation bar()
  58. {
  59. }
  60.  
  61. public funcation baz()
  62. {
  63. }
  64. }
  65. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement