array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'ds-vector.shift.php', 1 => 'Ds\\Vector::shift', ), 'up' => array ( 0 => 'class.ds-vector.php', 1 => 'Ds\\Vector', ), 'prev' => array ( 0 => 'ds-vector.set.php', 1 => 'Ds\\Vector::set', ), 'next' => array ( 0 => 'ds-vector.slice.php', 1 => 'Ds\\Vector::slice', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/ds/ds/vector/shift.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL ds >= 1.0.0)
Ds\Vector::shift — Removes and returns the first value
Bu işlevin bağımsız değişkeni yoktur.
The first value, which was removed.
UnderflowException if empty.
Örnek 1 Ds\Vector::shift() example
<?php
$vector = new \Ds\Vector(["a", "b", "c"]);
var_dump($vector->shift());
var_dump($vector->shift());
var_dump($vector->shift());
?>
Yukarıdaki örnek şuna benzer bir çıktı üretir:
string(1) "a" string(1) "b" string(1) "c"