PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

Ds\Vector::remove - Removes and returns a value by index. | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

Ds\Vector::remove

(PECL ds >= 1.0.0)

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

説明

public mixed Ds\Vector::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\Vector::remove() example

<?php
$vector 
= new \Ds\Vector(["a""b""c"]);

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

上の例の出力は、 たとえば以下のようになります。

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

忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「Ds\Vector::remove - Removes and returns a value by index.」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | Ds\Vector::remove - Removes and returns a value by index.」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: