Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64112 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38319 invoked from network); 29 Nov 2012 18:26:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Nov 2012 18:26:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=drgomesp@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=drgomesp@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: drgomesp@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:38988] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 76/27-08727-6D8A7B05 for ; Thu, 29 Nov 2012 13:26:31 -0500 Received: by mail-ob0-f170.google.com with SMTP id wp18so14243258obc.29 for ; Thu, 29 Nov 2012 10:26:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=smtdSwyZ/uaARTPQ9egviTJ9ycl+qRRpqozlJmWxwWs=; b=JzWuBYO8yNGnC1Fj0e+K+Rzup4/m5/dPpNPwhChh0uMcvhqVyk0Y6y/TRlAbu5LTCy B+oUoNH4667683DgQYCP2+Hk1hfA9WMpZxRnw2+GzD+XUnEA/Bc5A2/Oy2URhCtYxzm/ 5EZIzX8HJTUJiUlNdhHdAPFLGGwk7VPX28q+SgZSSQ+N9twVW5srCGx1oka/P+B3Wr10 pOUkMiybuNK4E8YiZLDKEZhJ3mMKvfkUo8sw4aMia6FC7kv+dvp4Uhc7zjy+FIERymdM Coz9oE0ylV23mCoIBlyczZGAgmGUkQVf/4E6ul48GCXaVgJKjxz9rder357Wz5BEWU/g vKUQ== Received: by 10.60.2.103 with SMTP id 7mr2468153oet.79.1354213588363; Thu, 29 Nov 2012 10:26:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.10.162 with HTTP; Thu, 29 Nov 2012 10:26:08 -0800 (PST) In-Reply-To: References: Date: Thu, 29 Nov 2012 16:26:08 -0200 Message-ID: To: Levi Morrison Cc: Rafael Dohms , PHP internals Content-Type: multipart/alternative; boundary=e89a8fb206fee2689d04cfa66bd3 Subject: Re: [PHP-DEV] SplDoublyLinkedList missing insertBefore/After From: drgomesp@gmail.com (Daniel Ribeiro Gomes) --e89a8fb206fee2689d04cfa66bd3 Content-Type: text/plain; charset=ISO-8859-1 It would be an awesome feature, indeed. Daniel Ribeiro Gomes Pereira Twitter | Facebook | LinkedIn iPhone: +55 (48) 9111-0931 2012/11/29 Levi Morrison > On Thu, Nov 29, 2012 at 4:38 AM, Rafael Dohms > wrote: > > I have just noticed that the current SPL inplementation of a > > DoublyLinkedList does not include methods to insert nodes into the middle > > of the list (insertBefore, insertAfter). > > > > After mentioning it I ran into a few people and other outbursts on the > > internet of more people who saw this and complained about it. > > > > I found a bug from 2009 (https://bugs.php.net/bug.php?id=48358) which > > mentions the case and has no Core response at all. > > > > I ask two questions: > > > > 1) Why was this bug never replied to, is there some reason these methods > > should not be implemented? > > > > 2) Is anyone willing to put up a patch for this? I imagine that if you > are > > familiar with C and PHP source this is a quick implementation as its > > standard logic documented everywhere. > > I am creating a library in PHP code that includes a linked list with > this feature ( > https://github.com/morrisonlevi/PHP-Datastructures/blob/master/src/Spl/LinkedList.php > ). > I'd love for you to use it while you wait for the core to be patched > and give me some feedback. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --e89a8fb206fee2689d04cfa66bd3--