Maximum float value in php

Posted by Alex Deem on Stack Overflow See other posts from Stack Overflow or by Alex Deem
Published on 2010-04-16T03:02:02Z Indexed on 2010/04/16 3:03 UTC
Read the original article Hit count: 281

Filed under:
|

Is there a way to programmatically retrieve the maximum float value for php. Akin to FLT_MAX or std::numeric_limits< float >::max() in C / C++?

I am using something like the following:

$minimumCost = MAXIMUM_FLOAT_VALUE??;

foreach ( $objects as $object )
{
    $cost = $object->CalculateCost();
    if ( $cost < $minimumCost )
    {
        $minimumCost = $cost;
    }
}

(using php 5.2)

© Stack Overflow or respective owner

Related posts about php

Related posts about php5