|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-04-25 23:03 UTC] cmb@php.net
-Package: SPL_Types
+Package: SPL related
[2018-04-25 23:24 UTC] cmb@php.net
[2018-06-16 15:32 UTC] cmb@php.net
-Summary: The order of the same priority is disordered
+Summary: The order of the same priority is not
maintained
-Status: Open
+Status: Verified
-Type: Bug
+Type: Documentation Problem
-Assigned To:
+Assigned To: cmb
[2018-06-16 15:32 UTC] cmb@php.net
[2018-06-16 15:40 UTC] cmb@php.net
[2018-06-16 15:42 UTC] cmb@php.net
-Status: Verified
+Status: Closed
[2018-06-16 15:42 UTC] cmb@php.net
[2020-02-07 06:05 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 04:00:01 2025 UTC |
Description: ------------ The order of the same priority is disordered Test script: --------------- $l = new \SplPriorityQueue; $l->insert('e', 1); $l->insert('a', 0); $l->insert('b', 0); $l->insert('c', 0); $l->insert('d', 100); var_dump($l); Expected result: ---------------- d e a b c Actual result: -------------- object(SplPriorityQueue)#4 (3) { ["flags":"SplPriorityQueue":private]=> int(1) ["isCorrupted":"SplPriorityQueue":private]=> bool(false) ["heap":"SplPriorityQueue":private]=> array(5) { [0]=> array(2) { ["data"]=> string(1) "d" ["priority"]=> int(100) } [1]=> array(2) { ["data"]=> string(1) "e" ["priority"]=> int(1) } [2]=> array(2) { ["data"]=> string(1) "b" ["priority"]=> int(0) } [3]=> array(2) { ["data"]=> string(1) "c" ["priority"]=> int(0) } [4]=> array(2) { ["data"]=> string(1) "a" ["priority"]=> int(0) } } }