Coder-Spirit / php-bignumbers

A robust library to handle immutable big numbers inside PHP applications
MIT License
131 stars 29 forks source link

Invalid object type #57

Closed Gemorroj closed 7 years ago

Gemorroj commented 7 years ago

If the object inherits object Decimal, methods from* return the wrong object.

example: https://gist.github.com/Gemorroj/f1a5ccc98d90615a3bf754b839b04300 I think https://github.com/Litipk/php-bignumbers/issues/32 this is resolve problem

castarco commented 7 years ago

This library has many problems and shortcomings due to bad design decisions, but the use case that you are explaining here is not a good example of such problems. In fact, there are far better ways to represent prices (through composition, not through inheritance).