original_string: private function writeIndex($zval, $index, $value)
      {
          if (!$zval[self::VALUE] instanceof \ArrayAccess && !\is_array($zval[self::VALUE])) {
              throw new NoSuchIndexException(sprintf('Cannot modify index "%s" in object of type "%s" because it doesn\'t implement \ArrayAccess.', $index, \get_class($zval[self::VALUE])));
          }
  
          $zval[self::REF][$index] = $value;
      }
code: private function writeIndex($zval, $index, $value)
      {
          if (!$zval[self::VALUE] instanceof \ArrayAccess && !\is_array($zval[self::VALUE])) {
              throw new NoSuchIndexException(sprintf('Cannot modify index "%s" in object of type "%s" because it doesn\'t implement \ArrayAccess.', $index, \get_class($zval[self::VALUE])));
          }
  
          $zval[self::REF][$index] = $value;
      }
code_tokens: private function writeIndex ( $ zval , $ index , $ value ) { if ( ! $ zval [ self :: VALUE ] instanceof \ ArrayAccess && ! \ is_array ( $ zval [ self :: VALUE ] ) ) { throw new NoSuchIndexException ( sprintf ( 'Cannot modify index "%s" in object of type "%s" because it doesn\'t implement \ArrayAccess.' , $ index , \ get_class ( $ zval [ self :: VALUE ] ) ) ) ; } $ zval [ self :: REF ] [ $ index ] = $ value ; }
docstring: Sets the value of an index in a given array-accessible value.
  
  @param array      $zval  The array containing the array or \ArrayAccess object to write to
  @param string|int $index The index to write at
  @param mixed      $value The value to write
  
  @throws NoSuchIndexException If the array does not implement \ArrayAccess or it is not an array
docstring_tokens: Sets the value of an index in a given array - accessible value .