freshbrewedweb/readable-measurements

PHP utility to extract measurements from human readable form.

dev-master 2017-05-26 19:01 UTC

This package is auto-updated.

Last update: 2024-12-08 16:08:53 UTC


README

PHP utility to extract measurements from human readable form.

Usage

$string = "10-20 feet";
$measurement = new ReadableMeasurements( $string );

echo $measurement->get();

Results in ['value' => [10, 20], 'unit' => 'feet']

Demo

View the demo here.

API

  • get gets the resulting matches.