dev-master
9999999-dev https://github.com/evopix/pheddarPHP library to convert human readable strings to numbers
MIT
The Requires
- php >=5.3.0
conversion numbers human
Wallogit.com
2017 © Pedro Peláez
PHP library to convert human readable strings to numbers
Pheddar is a port of the Ruby library Cheddar., (*1)
The basics., (*2)
<?php
use Pheddar\Human;
Human::to_number('15 hundred');
// => 1500
Human::to_number('$200 million');
// => 200000000
Human::to_number('15.72 vigintillion');
// => 1.5720000000000002E+64
Slightly more advanced., (*3)
<?php
Human::to_number('25 bucks');
// => 25
Human::to_number('20 large');
// => 2000
Human::to_number('33 straight up large bills');
// => 3300
PHP library to convert human readable strings to numbers
MIT
conversion numbers human