PHP 8.5.8 Released!

SplPriorityQueue::count

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

SplPriorityQueue::countCounts the number of elements in the queue

说明

public function SplPriorityQueue::count(): int

参数

此函数没有参数。

返回值

Returns the number of elements in the queue.

发现了问题?

了解如何改进此页面提交拉取请求报告一个错误
+添加备注

用户贡献的备注 1 note

up
1
xedin dot unknown at gmail dot com
7 years ago
After iteration, the queue will be empty. Therefore, `count()` will return 0. You can circumvent this by iterating over a clone, instead of the actual queue.
https://stackoverflow.com/questions/27464012/splpriorityqueuenext-is-removing-the-item 
+添加备注

AltStyle によって変換されたページ (->オリジナル) /