Jump to content

Interfaces


Drezard

Recommended Posts

     <?php
     
     interface myint {
         protected function myfunc ();
     }
      
     class myclass implements interface myint {
         protected function myfunc () {
             // ...
         }
     }
      
     ?>

 

Why does this code above through a fatal error of:

Fatal error: Access type for interface method myint::myfunc() must be omitted in C:\htdocs\source.php on line 18

 

How do I fix it?

Link to comment
https://forums.phpfreaks.com/topic/120669-interfaces/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.