Ds\Deque::remove

(PECL ds >= 1.0.0)

Ds\Deque::removeRemoves and returns a value by index.

Описание

public mixed Ds\Deque::remove ( int $index )

Removes and returns a value by index.

Список параметров

index

The index of the value to remove.

Возвращаемые значения

The value that was removed.

Ошибки

OutOfRangeException if the index is not valid.

Примеры

Пример #1 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));
?>

Результатом выполнения данного примера будет что-то подобное:

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

Коментарии

404 Not Found

404 Not Found


nginx

    Поддержать сайт на родительском проекте КГБ