library weight
Weight Class
weight/weight
Weight Class
- Saturday, May 3, 2014
- by amouhzi
- Repository
- 1 Watchers
- 3 Stars
- 10 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 4 Versions
- 0 % Grown
PHP Weight Class
PHP Weight Class helps developers to work with mass units., (*1)
Examples
Two ways to create new weight
1-, (*2)
$weight = new Weight(300, new Unit('KG'));
echo $weight; // 300 Kg
$wight->getValue() // returns 300
$weight->getUnit() // return Weight/Unit of KG.
2-, (*3)
$weight = new Weight(15, 'KG');
echo $weight;
shows, (*4)
300 Kg
Convert to another unit
$kgs = new Weight(300, new Unit('KG'));
$grams = $kgs->to(UNIT::GRAM);
echo (string) $grams;
shows, (*5)
300,000.00 g
Another way to convert
$tonnes = $kgs->to('tonne');
echo (string) $tonnes;
shows, (*6)
0.30 Mg
dev-master
9999999-dev
Weight Class
Sources
Download
MIT
The Requires
The Development Requires
v1.0.2
1.0.2.0
Weight Class
Sources
Download
MIT
The Requires
The Development Requires
v1.0.1
1.0.1.0
Weight Class
Sources
Download
MIT
The Requires
The Development Requires
v1.0.0
1.0.0.0
Weight Class
Sources
Download
MIT
The Requires
The Development Requires