Drezard Posted August 21, 2008 Share Posted August 21, 2008 <?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 More sharing options...
JasonLewis Posted August 21, 2008 Share Posted August 21, 2008 I don't know interfaces, but I'm pretty sure you don't need to say implements interface, because that may be confusing for it. Just saying implements should be enough. Omitted means it shouldn't be there, so try removing the "protected". Lol. Link to comment https://forums.phpfreaks.com/topic/120669-interfaces/#findComment-621811 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.