I am looking for a PHP library/class to manipulate units and quantities in a similar way to what the ruby-units
gems does. I have found a port of that Ruby library to JavaScript called js-quantities
, but not to PHP.
Are there any PHP libraries/classses for manipulating units & quantities out there?
Zend Framework 1 did inlcude a component called Zend_Measure
which is quite sophisticated but was dropped from Zend Framework 2.
I've been searching for the same thing and came across https://github.com/triplepoint/php-units-of-measure
I haven't tried it myself yet, but it looks to be very complete.
Edit: I looked a bit at the class referenced above for what I was wanting and it didn't go into the US equivalent measures like teaspoons and tablespoons. The class can be enhanced, but I think I'll continue along my own path as I have been.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With