How can I simplify a fraction in PHP?
For instance, converting 40/100 to 2/5.
40/100
2/5
The only way I could think of is to do a prime factor
The algorithm is pretty simple: