Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. PHP
  3. PHP Conversion

PHP Conversion

Apache-2.0PHP0.5.2

A PHP library for converting units, sizes, and number bases with support for physical quantities and clothing sizes.

GitHubGitHub
132 stars19 forks0 contributors

What is PHP Conversion?

php-conversion is a PHP library that provides tools for converting between different units of measurement, clothing sizes, and number bases. It solves the problem of handling diverse measurement systems in applications by offering a standardized, object-oriented approach to conversions.

Target Audience

PHP developers building applications that require unit conversions, such as e-commerce platforms, internationalization tools, scientific calculators, or systems dealing with multiple measurement standards.

Value Proposition

Developers choose php-conversion for its comprehensive support across categories (physical units, digital storage, sizes, number bases), clean API with dedicated classes for each type, and precise control over output formatting without external dependencies.

Overview

Library for converting units and sizes in PHP

Use Cases

Best For

  • Converting physical units like length or temperature in scientific applications
  • Handling international size conversions for e-commerce product listings
  • Formatting digital storage units (bytes, bits) in system monitoring tools
  • Converting number bases (hexadecimal to decimal) in programming utilities
  • Building calculators that need support for multiple measurement systems
  • Adding unit conversion capabilities to PHP-based admin panels or dashboards

Not Ideal For

  • High-performance applications needing micro-optimized, lightweight conversion functions due to object-oriented overhead
  • Projects requiring extensive custom or niche unit systems not covered, such as currency conversions or ancient measurements
  • Teams seeking actively maintained libraries with frequent updates and modern PHP framework integration

Pros & Cons

Pros

Comprehensive Unit Coverage

Supports a wide range of physical quantities, digital information, sizes, and number bases, making it versatile for applications like e-commerce or scientific tools, as listed in the README's extensive unit categories.

Type-Safe API Design

Uses dedicated classes for each conversion type, preventing unit mismatches and promoting code clarity, which aligns with the library's philosophy of type safety and self-documenting code.

Precise Formatting Control

Allows detailed control over output formatting, including decimal places and separators, demonstrated in the digital information example with the 'out' method for custom precision.

Niche Size Conversions

Uniquely supports international hat and child shoe size systems across American, British, and European standards, useful for specific e-commerce scenarios, as shown in the usage examples.

Cons

Limited Size Support

Only covers hat and child shoe sizes, lacking adult shoe sizes or other clothing measurements, which restricts its use for broader retail or fashion applications.

Potential Maintenance Issues

The library relies on older infrastructure like Travis CI and shows no recent updates in the README, suggesting it may not be actively maintained or compatible with modern PHP versions.

Overhead for Simple Tasks

The object-oriented approach requires instantiating classes for basic conversions, which can be cumbersome compared to function-based libraries for straightforward use cases.

Frequently Asked Questions

Quick Stats

Stars132
Forks19
Contributors0
Open Issues3
Last commit4 years ago
CreatedSince 2013

Tags

#scientific-computing#unit-conversion#e-commerce#internationalization#php-library#object-oriented#measurement

Built With

P
PHP

Included in

PHP32.5k
Auto-fetched 9 hours ago

Related Projects

MathPHPMathPHP

Powerful modern math library for PHP: Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra

Stars2,410
Forks240
Last commit6 months ago
Brick MathBrick Math

Arbitrary-precision arithmetic library for PHP

Stars2,162
Forks102
Last commit8 days ago
IPIP

Immutable value object for IPv4 and IPv6 addresses, including helper methods and Doctrine support.

Stars257
Forks20
Last commit2 months ago
ByteUnitsByteUnits

Library to parse, format and convert byte units

Stars168
Forks16
Last commit5 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub