This is a discussion on RE: [PHP] PHP5 interfaces? within the PHP General forums, part of the PHP Programming Forums category; [snip] So does this mean that I can then do: Class BusyBoardMember implements Employee, BoardMember { function position() { // code for Employee ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
[snip]
So does this mean that I can then do: Class BusyBoardMember implements Employee, BoardMember { function position() { // code for Employee implementation; } function position() { // code for BoardMember implementation; } } And if I only implement position() once then it will return an error? This seems more than a little confusing, and like it could cause serious mistakes down the road (during maintenance, etc) [/snip] Why don't you (pretend the following is emphasized) test it (/emph) to find out? [ALERT - NEWBIE GUIDE ADDITION] 10. Testing yields results - rather than speculate over potential code chunks write a small test bed and then apply vigorous automated or manual testing. [/ALERT] |