|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-12-21 17:01 UTC] cataphract@php.net
-Assigned To:
+Assigned To: cataphract
[2010-12-21 18:29 UTC] cataphract@php.net
[2010-12-21 18:29 UTC] cataphract@php.net
-Status: Assigned
+Status: Closed
-Type: Feature/Change Request
+Type: Bug
[2010-12-21 18:29 UTC] cataphract@php.net
[2010-12-21 20:53 UTC] cataphract@php.net
-Status: Closed
+Status: Bogus
[2010-12-21 20:53 UTC] cataphract@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 19:00:01 2025 UTC |
Description: ------------ SplMinHeap have the same behavior than SplMaxHeap when inserting data. Top value of a SplMinHeap object is the max value instead of the min Test script: --------------- class MySimpleHeap extends SplMinHeap{ public function compare( $value1, $value2 ){ return ( $value1 - $value2 ); } } $obj = new MySimpleHeap(); $obj->insert( 8 ); $obj->insert( 0 ); $obj->insert( 4 ); foreach( $obj as $number ) { echo $number."\n"; } // Output display : 8, 4, 0 instead of 0, 4, 8