Ds\Deque::remove

Removes and returns a value by index

&reftitle.description; public `mixed` `Ds\Deque::remove` `int` `index`

Removes and returns a value by index.

&reftitle.parameters;

`index`

- The index of the value to remove.

&reftitle.returnvalues;

The value that was removed.

&reftitle.errors;

`OutOfRangeException` if the index is not valid.

&reftitle.examples;

### `Ds\Deque::remove` example

    <?php
    $deque = new \Ds\Deque(["a", "b", "c"]);

    var_dump($deque->remove(1));
    var_dump($deque->remove(0));
    var_dump($deque->remove(0));
    ?>

&example.outputs.similar;

    string(1) "b"
    string(1) "a"
    string(1) "c"