Skip to content

Instantly share code, notes, and snippets.

@mattparker
Created April 22, 2014 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattparker/11178674 to your computer and use it in GitHub Desktop.
Save mattparker/11178674 to your computer and use it in GitHub Desktop.
why php is super
<?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