A collection of PHP primitive Types with common transformations.
Currently available primitives:
- Distance
- Mass
- Temperature
- Volume
TODO:
- many more examples
- More tests
- Create formatter methods for each of the classes
Examples for each Type can be found in the /examples
folder
$productWeight = Mass::createFromGrams(1600);
echo 'Product weight: ', number_format($productWeight->toKilograms(), 2), "kg \n";