tigo/units-conversion

v0.0.2 2021-05-20 01:23 UTC

This package is auto-updated.

Last update: 2024-09-20 09:01:17 UTC


README

CONVERSION TABLE OF UNITS OF LENGTH

  • This package can be used with any PHP application or Frameworks/PHP.
  • Download package: composer require tigo/units-conversion
  • Recommended version: PHP >= 7.2
  • MIT license. Feel free to use this project. Leave a star ⭐ or make a fork !

If you found this project useful, consider making a donation to support the developer.

paypal paypal

Identification code (Unit of length)

Directory: ..\src\Length\StandardUnit.php
  • Hectometer = 1
  • Decameter = 2
  • Meters = 3
  • Decimeter = 4
  • Centimeter = 5
  • Millimeter = 6
  • Yards = 7
  • Feet = 8
  • Inch = 9
  • Kilometer = 10
  • Nanometers = 11
  • Micrometers = 12

Introduction

Somewhere in your project, you may need to use autoload

include __DIR__ ."/vendor/autoload.php";

Example: CONVERSION TABLE OF UNITS OF LENGTH

   use Tigo\UnitsConversion\ClientLength; //import class 
   $client = new ClientLength();
   /**
     Example: Converting kilometer to meter
     $client->convert(kilometer, meter, value)
   **/
   print_r($client->convert(10, 3, 23)); // result: 23000 (meter)
   
   /**
     Example: Converting Yard to Inch
     $client->convert(yard, inch, value)
   **/
   print_r($client->convert(7, 9, 23)); // result: 828 (inch)

Supporting this project

If you are interested in supporting this project, you can help in many ways. Leave a star ⭐ or make a donation of any value.

Sponsor supporting this project

  • []

Contributors

License

MIT license. See the archive License