Abacus object implemented in PHP