array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'threaded.pop.php', 1 => 'Threaded::pop', ), 'up' => array ( 0 => 'class.threaded.php', 1 => 'Threaded', ), 'prev' => array ( 0 => 'threaded.notifyone.php', 1 => 'Threaded::notifyOne', ), 'next' => array ( 0 => 'threaded.run.php', 1 => 'Threaded::run', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/pthreads/threaded/pop.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL pthreads >= 2.0.0)
Threaded::pop — Manipulation
この関数にはパラメータはありません。
The last item from the objects property table
例1 Popping the last item from the property table of a threaded object
<?php
$safe = new Threaded();
while (count($safe) < 10)
$safe[] = count($safe);
var_dump($safe->pop());
?>
上の例の出力は以下となります。
int(9)