note 125712 added to splpriorityqueue.next
| From: | ivail89.mail.ru via php-notes | Date: | Fri, 22 Jan 2021 16:20:23 +0000 |
| Subject: | note 125712 added to splpriorityqueue.next | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216218@lists.php.net to get a copy of this message | ||
Method 'next' deletes node from top. See example:
<?php
$queue = new SplPriorityQueue();
$queue->insert('Q', 5);
$queue->insert('W', 1);
$queue->insert('E', 4);
$queue->insert('R', 2);
$queue->insert('Y', 3);
$queue->next();
$queue->next();
$queue->next();
print_r($queue);
?>
Will be output:
SplPriorityQueue Object
(
[flags:SplPriorityQueue:private] => 1
[isCorrupted:SplPriorityQueue:private] =>
[heap:SplPriorityQueue:private] => Array
(
[0] => Array
(
[data] => R
[priority] => 2
)
[1] => Array
(
[data] => W
[priority] => 1
)
)
)
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.166 (proxied: 78.107.84.40)
----
Manual Page -- http://php.net/manual/en/splpriorityqueue.next.php
Edit -- https://master.php.net/note/edit/125712
Del: integrated -- https://master.php.net/note/delete/125712/integrated
Del: useless -- https://master.php.net/note/delete/125712/useless
Del: bad code -- https://master.php.net/note/delete/125712/bad+code
Del: spam -- https://master.php.net/note/delete/125712/spam
Del: non-english -- https://master.php.net/note/delete/125712/non-english
Del: in docs -- https://master.php.net/note/delete/125712/in+docs
Del: other reasons-- https://master.php.net/note/delete/125712
Reject -- https://master.php.net/note/reject/125712
Search -- https://master.php.net/manage/user-notes.php