original_string: private function removeReferenceItemInArray(array &$room)
      {
          $roomCopy = $room;
          $keys = array_keys($room);
          foreach ($keys as $key) {
              if (is_array($roomCopy[$key])) {
                  $roomCopy[$key]['_test'] = true;
                  if (isset($room[$key]['_test'])) {
                      // It's a reference
                      unset($room[$key]);
                  }
              }
          }
      }
code: private function removeReferenceItemInArray(array &$room)
      {
          $roomCopy = $room;
          $keys = array_keys($room);
          foreach ($keys as $key) {
              if (is_array($roomCopy[$key])) {
                  $roomCopy[$key]['_test'] = true;
                  if (isset($room[$key]['_test'])) {
                      // It's a reference
                      unset($room[$key]);
                  }
              }
          }
      }
code_tokens: private function removeReferenceItemInArray ( array & $ room ) { $ roomCopy = $ room ; $ keys = array_keys ( $ room ) ; foreach ( $ keys as $ key ) { if ( is_array ( $ roomCopy [ $ key ] ) ) { $ roomCopy [ $ key ] [ '_test' ] = true ; if ( isset ( $ room [ $ key ] [ '_test' ] ) ) { // It's a reference unset ( $ room [ $ key ] ) ; } } } }
docstring: Remove reference item in array
  
  @param array &$room
  
  @return void
  
  @see http://stackoverflow.com/questions/3148125/php-check-if-object-array-is-a-reference
  @author Chris Smith (original source)
docstring_tokens: Remove reference item in array