2017 © Pedro Peláez
 

library pheddar

PHP library to convert human readable strings to numbers

image

evopix/pheddar

PHP library to convert human readable strings to numbers

  • Monday, March 5, 2012
  • by evopix
  • Repository
  • 2 Watchers
  • 3 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Pheddar - Transform human readable text into integers or floats.

Pheddar is a port of the Ruby library Cheddar., (*1)

Examples

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

The Versions

05/03 2012

dev-master

9999999-dev https://github.com/evopix/pheddar

PHP library to convert human readable strings to numbers

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

conversion numbers human