ZF-5374: bcmath doesn't handle numbers in exponential notation
Try this :
$unit = new Zend_Measure_Pressure(1, Zend_Measure_Pressure::KILOBAR); $unit->setType(Zend_Measure_Pressure::STANDARD); echo $unit->toString();
It should display 100000000.0000000000000000000000000 N/m², but it displays 0.
I think it's because bcmath doesn't handle numbers in exponential notation. If you look in Zend_Measure_Pressure, you can see that '1.0e+8' is set for KILOBAR factor. bcmath doesn't recognize the 'e+8', so it multiplies the value by 0. Obviously, it's like this everywhere.
One workaround is to remove the quote and use a float, or better write the factors expanded : 100000000 instead of 1.0e+8.