Skip to content

Instantly share code, notes, and snippets.

@Akii
Created August 26, 2013 19:01
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 Akii/6345210 to your computer and use it in GitHub Desktop.
Save Akii/6345210 to your computer and use it in GitHub Desktop.
class Money {
protected $amount;
public function __construct($amount) {
$this->amount = $amount;
}
public function subtract($amount) {
return new Money($this->amount - $amount);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment