What instead Zend_Measure?

In Zend Framework 1 was usefull component, named “Zend_Measure”.
I can’t find it in Laminas Framework.

What instead Zend_Measure in Laminas Framework?

// Example convert Millimeters to Inches
        $value = 123; // 123 mm
        $value = new Zend_Measure_Length($value, Zend_Measure_Length::MILLIMETER);
        $value->setType(Zend_Measure_Length::INCH);
        $result = $value->getValue();// get Inch value

Correct, it was never ported because one of the goals is now interoperability and not all-in-one.

The search of GitHub or Packagist can help here. Examples:

1 Like

Thanks for your reply. I will look for a replacement.

I use https://packagist.org/packages/jordanbrauer/unit-converter

It’s a bit clunky, but it gets the job done :slight_smile:

1 Like