I am developing a non profit project that uses a lot of forks (and bitcoin of course) - but's i can't decide what datatype use to store prices.
There are several ways to do this, but i have chosen two of them - to use BIGINTEGER, and store it as a STRING
1) - BIGINTEGER (in this case i keep pennie e.g. Satoshi) it's better to use in calculations - but i can't wrap my head around - how to properly take user input? What datatype should i use to use math operations in PHP, and what additional data i need to keep to convert on currency to another (i mean there are possibility that some forks can use more digits after point.)
2) STRING - just impossible to make any computations, before proper conversion. But it's much simper to keep - i mean you just can store the raw user's input
Can somebody share some ideas with me about this matter?