Created
April 22, 2014 13:13
-
-
Save mattparker/11178674 to your computer and use it in GitHub Desktop.
why php is super
This file contains hidden or 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 | |
class Marvellous implements Community { | |
public function smart () { | |
return true; | |
} | |
public function helpful () { | |
return true; | |
} | |
public function join (Anyone $person) { | |
return true; | |
} | |
} | |
class Future implements Solid { | |
use Interesting; | |
} | |
class PHP { | |
/** | |
* @var Awesome | |
*/ | |
private $whatIsPossible; | |
/** | |
* @return Marvellous | |
*/ | |
public function getCommunity () { | |
} | |
public function powers () { | |
// Note: this can be quite big. Be careful | |
// calling this method. | |
return new Internet(); | |
} | |
public function can () { | |
return $this->whatIsPossible; | |
} | |
public function badBits () { | |
throw new MostlyNotThatBadException("Handling these isn't so bad you know"); | |
} | |
/** | |
* @return Future | |
*/ | |
protected function lookingAhead () { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment