public function castDecimal()
    {
        $min   = (float) 4.9E-324;
        $max   = (float) 1.7976931348623157E+308;
        $value = (float) $this->value;

        if ($value >= $min && $value <= $max) {
            return $value;
        }

        $castFunction = function($value) use ($min,$max) {
            if ($value < $min ) {
                return $min;
            }

            if ($value > $max) {
                return $max;
            }

            return (float) $value;
        };

        if (is_numeric($this->value)) {
            return $castFunction($this->value);
        }

        return $this->handleMismatch($castFunction, 'decimal');
    }
public function castDecimal()
    {
        $min   = (float) 4.9E-324;
        $max   = (float) 1.7976931348623157E+308;
        $value = (float) $this->value;

        if ($value >= $min && $value <= $max) {
            return $value;
        }

        $castFunction = function($value) use ($min,$max) {
            if ($value < $min ) {
                return $min;
            }

            if ($value > $max) {
                return $max;
            }

            return (float) $value;
        };

        if (is_numeric($this->value)) {
            return $castFunction($this->value);
        }

        return $this->handleMismatch($castFunction, 'decimal');
    }
public function castDecimal ( ) { $ min = ( float ) 4.9E-324 ; $ max = ( float ) 1.7976931348623157E+308 ; $ value = ( float ) $ this -> value ; if ( $ value >= $ min && $ value <= $ max ) { return $ value ; } $ castFunction = function ( $ value ) use ( $ min , $ max ) { if ( $ value < $ min ) { return $ min ; } if ( $ value > $ max ) { return $ max ; } return ( float ) $ value ; } ; if ( is_numeric ( $ this -> value ) ) { return $ castFunction ( $ this -> value ) ; } return $ this -> handleMismatch ( $ castFunction , 'decimal' ) ; }
Casts the internal value to an integer cmprehended between a range of
accepted integers.

@return integer
Casts the internal value to an integer cmprehended between a range of accepted integers .