DEV Community

Zubair Mohsin
Zubair Mohsin

Posted on

4 1

How do you deal with Money in PHP?

What's your take on dealing with money in PHP?

Use third party package like MoneyPHP?

Use decimal or integer datatype in MySQL and in PHP use BCMath to perform operations?

Top comments (2)

Collapse
 
peter279k profile image
peter279k

I usually use the moneyphp/money to accomplish this issue :).

Collapse
 
muhammadmp profile image
Muhammad MP

I just use integer for my local currency.

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE