Created
September 27, 2011 09:56
-
-
Save zeuxisoo/1244724 to your computer and use it in GitHub Desktop.
Why interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface Person { | |
public function name(); | |
public function gender(); | |
} | |
class Tom implements Person { | |
// Must!! | |
public function name() { /* do something... */ } | |
public function gender() { /* do something... */ } | |
} | |
class Neo implements Person { | |
// Must!! | |
public function name() { /* do something... */ } | |
public function gender() { /* do something... */ } | |
// Custom by self | |
public function love() { /* do something... */ } | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment