function replacePlaceholders(array $symbols, array $placeholders = array()) {
    $placeholders = array_merge(array(
      self::SYMBOL_SPECIAL_GROUPING_SEPARATOR,
      self::SYMBOL_SPECIAL_INFINITY,
      self::SYMBOL_SPECIAL_MINUS,
      self::SYMBOL_SPECIAL_NAN,
      self::SYMBOL_SPECIAL_PLUS,
    ), $placeholders);
    $replacements = array();
    foreach (array_unique($placeholders) as $placeholder) {
      $replacements[$placeholder] = $this->getReplacement($placeholder);
    }
    foreach ($symbols as $symbol) {
      foreach ($replacements as $placeholder => $replacement) {
        if (!$symbol->replacement && $symbol->symbol == $placeholder) {
          $symbol->replacement = $replacement;
        }
      }
    }
  }
function replacePlaceholders(array $symbols, array $placeholders = array()) {
    $placeholders = array_merge(array(
      self::SYMBOL_SPECIAL_GROUPING_SEPARATOR,
      self::SYMBOL_SPECIAL_INFINITY,
      self::SYMBOL_SPECIAL_MINUS,
      self::SYMBOL_SPECIAL_NAN,
      self::SYMBOL_SPECIAL_PLUS,
    ), $placeholders);
    $replacements = array();
    foreach (array_unique($placeholders) as $placeholder) {
      $replacements[$placeholder] = $this->getReplacement($placeholder);
    }
    foreach ($symbols as $symbol) {
      foreach ($replacements as $placeholder => $replacement) {
        if (!$symbol->replacement && $symbol->symbol == $placeholder) {
          $symbol->replacement = $replacement;
        }
      }
    }
  }
function replacePlaceholders ( array $ symbols , array $ placeholders = array ( ) ) { $ placeholders = array_merge ( array ( self :: SYMBOL_SPECIAL_GROUPING_SEPARATOR , self :: SYMBOL_SPECIAL_INFINITY , self :: SYMBOL_SPECIAL_MINUS , self :: SYMBOL_SPECIAL_NAN , self :: SYMBOL_SPECIAL_PLUS , ) , $ placeholders ) ; $ replacements = array ( ) ; foreach ( array_unique ( $ placeholders ) as $ placeholder ) { $ replacements [ $ placeholder ] = $ this -> getReplacement ( $ placeholder ) ; } foreach ( $ symbols as $ symbol ) { foreach ( $ replacements as $ placeholder => $ replacement ) { if ( ! $ symbol -> replacement && $ symbol -> symbol == $ placeholder ) { $ symbol -> replacement = $ replacement ; } } } }
Replaces placeholders.

@param array $symbols
An array of NumberPatternSymbol objects which are altered.
@param array $placeholders
Characters that should be matched by a NumberPatternSymbol object.
Replaces placeholders .