original_string: public function writeArray(&$array)
      {
          // arrays aren't reference here but still counted
          $this->_referenceObjects[] = $array;
  
          // have to seperate mixed from numberic keys.
          $numeric = array();
          $string  = array();
          foreach ($array as $key => &$value) {
              if (is_int($key)) {
                  $numeric[] = $value;
              } else {
                  $string[$key] = $value;
              }
          }
  
          // write the preamble id of the array
          $length = count($numeric);
          $id     = ($length << 1) | 0x01;
          $this->writeInteger($id);
  
          //Write the mixed type array to the output stream
          foreach($string as $key => &$value) {
              $this->writeString($key)
                   ->writeTypeMarker($value);
          }
          $this->writeString($this->_strEmpty);
  
          // Write the numeric array to ouput stream
          foreach($numeric as &$value) {
              $this->writeTypeMarker($value);
          }
          return $this;
      }
code: public function writeArray(&$array)
      {
          // arrays aren't reference here but still counted
          $this->_referenceObjects[] = $array;
  
          // have to seperate mixed from numberic keys.
          $numeric = array();
          $string  = array();
          foreach ($array as $key => &$value) {
              if (is_int($key)) {
                  $numeric[] = $value;
              } else {
                  $string[$key] = $value;
              }
          }
  
          // write the preamble id of the array
          $length = count($numeric);
          $id     = ($length << 1) | 0x01;
          $this->writeInteger($id);
  
          //Write the mixed type array to the output stream
          foreach($string as $key => &$value) {
              $this->writeString($key)
                   ->writeTypeMarker($value);
          }
          $this->writeString($this->_strEmpty);
  
          // Write the numeric array to ouput stream
          foreach($numeric as &$value) {
              $this->writeTypeMarker($value);
          }
          return $this;
      }
code_tokens: public function writeArray ( & $ array ) { // arrays aren't reference here but still counted $ this -> _referenceObjects [ ] = $ array ; // have to seperate mixed from numberic keys. $ numeric = array ( ) ; $ string = array ( ) ; foreach ( $ array as $ key => & $ value ) { if ( is_int ( $ key ) ) { $ numeric [ ] = $ value ; } else { $ string [ $ key ] = $ value ; } } // write the preamble id of the array $ length = count ( $ numeric ) ; $ id = ( $ length << 1 ) | 0x01 ; $ this -> writeInteger ( $ id ) ; //Write the mixed type array to the output stream foreach ( $ string as $ key => & $ value ) { $ this -> writeString ( $ key ) -> writeTypeMarker ( $ value ) ; } $ this -> writeString ( $ this -> _strEmpty ) ; // Write the numeric array to ouput stream foreach ( $ numeric as & $ value ) { $ this -> writeTypeMarker ( $ value ) ; } return $ this ; }
docstring: Write a PHP array back to the amf output stream
  
  @param array $array
  @return Zend_Amf_Parse_Amf3_Serializer
docstring_tokens: Write a PHP array back to the amf output stream