original_string: public static function exchange(array &$elements, $indexA, $indexB)
      {
          $count = count($elements);
  
          if (($indexA < 0 || $indexA > ($count - 1))
              || $indexB < 0
              || $indexB > ($count - 1)
          ) {
              throw new IndexOutOfBoundsException();
          }
  
          $temp = $elements[$indexA];
  
          $elements[$indexA] = $elements[$indexB];
  
          $elements[$indexB] = $temp;
      }
code: public static function exchange(array &$elements, $indexA, $indexB)
      {
          $count = count($elements);
  
          if (($indexA < 0 || $indexA > ($count - 1))
              || $indexB < 0
              || $indexB > ($count - 1)
          ) {
              throw new IndexOutOfBoundsException();
          }
  
          $temp = $elements[$indexA];
  
          $elements[$indexA] = $elements[$indexB];
  
          $elements[$indexB] = $temp;
      }
code_tokens: public static function exchange ( array & $ elements , $ indexA , $ indexB ) { $ count = count ( $ elements ) ; if ( ( $ indexA < 0 || $ indexA > ( $ count - 1 ) ) || $ indexB < 0 || $ indexB > ( $ count - 1 ) ) { throw new IndexOutOfBoundsException ( ) ; } $ temp = $ elements [ $ indexA ] ; $ elements [ $ indexA ] = $ elements [ $ indexB ] ; $ elements [ $ indexB ] = $ temp ; }
docstring: Exchange two elements in an array.
  
  @param array $elements
  @param int $indexA
  @param int $indexB
  
  @throws IndexOutOfBoundsException
docstring_tokens: Exchange two elements in an array .