Req #51565 [Opn->Wfx]: PHP Spl(Binary)Tree Structure

From: Date: Mon, 16 Aug 2021 14:26:56 +0000
Subject: Req #51565 [Opn->Wfx]: PHP Spl(Binary)Tree Structure
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235857@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=51565&edit=1 ID: 51565 Updated by: cmb@php.net Reported by: clintonxa at gmail dot com Summary: PHP Spl(Binary)Tree Structure -Status: Open +Status: Wont fix Type: Feature/Change Request Package: SPL related Operating System: All PHP Version: 5.3.2 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: > I suggest this request can be closed. Right. There is already SplHeap, and if that implementation is not sufficiently performant for some cases, this needs to be proven, and someone would need to pursue the RFC process[1]. [1] <https://wiki.php.net/rfc/howto> Previous Comments: ------------------------------------------------------------------------ [2020-04-22 07:09:55] alexinbeijing at gmail dot com I suggest this request can be closed. ------------------------------------------------------------------------ [2011-12-13 02:57:56] morrison dot levi at gmail dot com Honestly, heaps are just a representation of trees. I know that particular benefits are associated with trees and others with heaps, but generally speaking you could probably just use a heap. ------------------------------------------------------------------------ [2010-04-15 23:35:49] clintonxa at gmail dot com Description: ------------ SPL has so far included several very useful structures, and another basic one that we would benefit from is a tree structure. It is possible to use an array for this now, but an SPL class would be beneficial. Test script: --------------- <?php $btree = new SplBinaryTree(BTREE_SORT_NUMERIC); $btree->add(4); $btree->add(10); $btree->add(2); // Well, I'm not sure on how PHP devs would implement the tree's methods. // But a quick browse through any intro to OOP guide will give some ideas. ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=51565&edit=1

« previous php.bugs (#235857) next »