Removes the item at index position i and returns it. i must be a valid index
position in the list (i.e., 0 <= i < size()).

@param int $i
@return mixed
484563
public function takeAt(int $i)
    {
        $value = $this->list[$i];

        unset($this->list[$i]);

        return $value;
    }
79129
public function removeFile($fileIndex)
    {
        $removed = false;
        $positions = $this->positions;
        foreach ($positions as $cn => $position) {
            $source = $position->source;
            $fi = $source->fileIndex;
            if ($fi === $fileIndex) {
                $removed = true;
                unset($this->positions[$cn]);
            } elseif ($fi > $fileIndex) {
                $source->fileIndex--;
            }
        }
        return $removed;
    }
511667
public function itemAt ($index) {
        if (isset($this->_d[$index]))
            return $this->_d[$index];
        elseif ($index >= 0 && $index < $this->_c) // in case the value is null
            return $this->_d[$index];
        else
            throw new Exception(Yii::t ('yii' , 'List index "{index}" is out of bound.' ,
                array('{index}' => $index)));
    }
92054
public function indexOf($value): ?int
    {
        $i = 0;
        foreach ($this->items as $key => $iValue) {
            if ($value === $iValue) {
                return $i;
            }
            ++$i;
        }

        return null;
    }
124751
public function get($index = 0)
        {
            if (is_integer($index)) {
                if ($index + 1 > $this->count()) {
                    return null;
                } else {
                    return Arrays::first(array_slice($this->_items, $index, 1));
                }
            } else {
                if ($this->has($index)) {
                    return $this->_items[$index];
                }
            }

            return null;
        }
1075162
public function removeAt($position)
    {
        if (!is_numeric($position) || $position < 0) {
            throw new \InvalidArgumentException();
        }

        if ($position < count($this->items)) {
            array_splice($this->items, $position, 1);
        }

        $this->isUpdated = true;

        return $this;
    }
1153628
public function extract(): Item
    {
        if (!$this->isSorted) {
            usort($this->list, [$this, 'compare']);
            $this->isSorted = true;
        }

        return array_pop($this->list);
    }
892125
public function offsetUnset ($index)
	{
		$value = $this->offsetGet($index);

		if ($index == 0) {
			return array_shift($this->storage);
		}

		if ($index == $this->count() - 1) {
			return array_pop($this->storage);
		}

		$new = $this->slice(0, $index - 1);
		$new->push($this->slice($index, $this->count()));

		$this->storage = $new->to_array();

		return $value;
	}
1076728
public function remove()
    {
        if ($this->count() === 0) {
            throw new NoSuchElementException('Can\'t return element from Queue. Queue is empty.');
        }

        $head = $this[$this->index];

        unset($this[$this->index]);
        $this->index++;

        return $head;
    }
119767
public E remove (int index) {
		E e = data[index]; // make copy of element to remove so it can be returned
		data[index] = data[--size]; // overwrite item to remove with last element
		data[size] = null; // null last element, so gc can do its work
		return e;
	}
515094
public function cut($index = self::LAST)
    {
        //Argument 1 must be a string or integer
        Argument::i()->test(1, 'string', 'int');

        //if index is first
        if ($index == self::FIRST) {
            //we really mean 0
            $index = 0;
        //if index is last
        } else if ($index == self::LAST) {
            //we realy mean the last index number
            $index = count($this->list) -1;
        }

        //if this row is found
        if (isset($this->list[$index])) {
            //unset it
            unset($this->list[$index]);
        }

        //reindex the list
        $this->list = array_values($this->list);

        return $this;
    }
482144
public function clearIndex($dir)
    {
        $success = 0;

        if (!file_exists($dir))
        {
            $success = 1;
        }

        if (!is_dir($dir))
        {
            return @unlink($dir);
        }

        foreach (scandir($dir) as $item)
        {
            if ($item == '.' || $item == '..')
            {
                continue;
            }

            if (!$this->clearIndex($dir . DIRECTORY_SEPARATOR . $item))
            {
                $success = 0;
            }

        }

        $sucess = @rmdir($dir);

        return $sucess;
    }
275623
public function remove($index) {
        $element = $this->get($index);
        if (!is_null($element)) { array_splice($this->_elements, $index, 1); }
        return $element;
    }
576710
public function indexOf( $item ) {

			for ( $i=0; $i < $this->len; $i++ ) {

				if ( $this->compare( $item, $this->items[$i] ) === 0 ) {
					return $i;
				}

			}

			return -1;

		}
351369
private static function RemoveIterator( $iter, $index )
	{
		$pos = 1;

		/**
		 * @var XPathItem $item
		 */
		foreach ( $iter as $item )
		{
		    if ( $index != $pos )
			   yield $item;
		    $pos++;
		}
	}
579741
public function getCardAtIndex($i)
    {
        if (isset($this->vcardObjects[$i])) {
            return $this->vcardObjects[$i];
        }
        throw new \OutOfBoundsException();
    }
64002
public function get(int $index): ?int {
        if (isset($this->array[$index])) {
            return $this->array[$index];
        }
        return null;
    }