original_string: public static function parseString($source, $matchRules)
      {
          foreach ((array) $matchRules as $matchRule) {
              if (is_callable($matchRule) === true) {
                  return call_user_func($matchRule, $source);
              } else {
                  if (preg_match($matchRule, $source, $matches) === 1) {
                      $value = $matches['integral'];
                      if (isset($matches['fractional'])) {
                          $value .= '.' . $matches['fractional'];
                      }
                      return (double) $value;
                  }
              }
          }
          return false;
      }
code: public static function parseString($source, $matchRules)
      {
          foreach ((array) $matchRules as $matchRule) {
              if (is_callable($matchRule) === true) {
                  return call_user_func($matchRule, $source);
              } else {
                  if (preg_match($matchRule, $source, $matches) === 1) {
                      $value = $matches['integral'];
                      if (isset($matches['fractional'])) {
                          $value .= '.' . $matches['fractional'];
                      }
                      return (double) $value;
                  }
              }
          }
          return false;
      }
code_tokens: public static function parseString ( $ source , $ matchRules ) { foreach ( ( array ) $ matchRules as $ matchRule ) { if ( is_callable ( $ matchRule ) === true ) { return call_user_func ( $ matchRule , $ source ) ; } else { if ( preg_match ( $ matchRule , $ source , $ matches ) === 1 ) { $ value = $ matches [ 'integral' ] ; if ( isset ( $ matches [ 'fractional' ] ) ) { $ value .= '.' . $ matches [ 'fractional' ] ; } return ( double ) $ value ; } } } return false ; }
docstring: Parse string by regexp or closure.
  @param string $source
  @param \Closure[]|string[]|\Closure|string $matchRules
  @return false|float
docstring_tokens: Parse string by regexp or closure .