public static function convertToNumberIfFraction(&$operand)
    {
        if (preg_match('/^'.self::STRING_REGEXP_FRACTION.'$/i', $operand, $match)) {
            $sign = ($match[1] == '-') ? '-' : '+';
            $fractionFormula = '='.$sign.$match[2].$sign.$match[3];
            $operand = PHPExcel_Calculation::getInstance()->_calculateFormulaValue($fractionFormula);
            return true;
        }
        return false;
    }
public static function convertToNumberIfFraction(&$operand)
    {
        if (preg_match('/^'.self::STRING_REGEXP_FRACTION.'$/i', $operand, $match)) {
            $sign = ($match[1] == '-') ? '-' : '+';
            $fractionFormula = '='.$sign.$match[2].$sign.$match[3];
            $operand = PHPExcel_Calculation::getInstance()->_calculateFormulaValue($fractionFormula);
            return true;
        }
        return false;
    }
public static function convertToNumberIfFraction ( & $ operand ) { if ( preg_match ( '/^' . self :: STRING_REGEXP_FRACTION . '$/i' , $ operand , $ match ) ) { $ sign = ( $ match [ 1 ] == '-' ) ? '-' : '+' ; $ fractionFormula = '=' . $ sign . $ match [ 2 ] . $ sign . $ match [ 3 ] ; $ operand = PHPExcel_Calculation :: getInstance ( ) -> _calculateFormulaValue ( $ fractionFormula ) ; return true ; } return false ; }
Identify whether a string contains a fractional numeric value,
and convert it to a numeric if it is

@param string &$operand string value to test
@return boolean
Identify whether a string contains a fractional numeric value and convert it to a numeric if it is