Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62245 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94726 invoked from network); 18 Aug 2012 16:08:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Aug 2012 16:08:20 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:36978] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/19-31572-3FDBF205 for ; Sat, 18 Aug 2012 12:08:20 -0400 Received: by lbbgp3 with SMTP id gp3so2746658lbb.29 for ; Sat, 18 Aug 2012 09:08:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=T0SzAyf0vmLTk/s4HB8mUzMtMNSVuGWoWvYICp0cCQs=; b=y02OZ0Ibl19LCv2Uxky2xObLgGH6ArXwvcLjNTtDCU3KsPQgSZy1PmQOEHGsb2WjLP y26LgJLsShpmUX4MfT6z6a3Vk++fcJUQgBey6zryi3tnI7ZdSiZD5s5d0NsUGLJAiI2+ 5DBUsqwdp0se8/vemsy0rmxwu4+7LzmeX5NoRTCJkYa20/SVFllGwW1Farp0V0lUYEPs RJAvqolqMN7C7OPri6uUiSVwaUmOHUF3FbE6YB7nRUbvayfecFq8/FxYW+/pZEyA9RPC /JplMJVMt4KOM71IcxdcVKJaje7N5XGNHhhqKBiPY/Wkj1sXmsNlBj0ZHi1qfXiYjNNB YOww== MIME-Version: 1.0 Received: by 10.152.148.195 with SMTP id tu3mr8549670lab.16.1345306096979; Sat, 18 Aug 2012 09:08:16 -0700 (PDT) Received: by 10.112.89.174 with HTTP; Sat, 18 Aug 2012 09:08:16 -0700 (PDT) In-Reply-To: <96A1E46F-8347-4B29-8277-AEC122063869@gmail.com> References: <96A1E46F-8347-4B29-8277-AEC122063869@gmail.com> Date: Sat, 18 Aug 2012 10:08:16 -0600 Message-ID: To: Alexey Zakhlestin Cc: Rasmus Schultz , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] removing an item from an array From: morrison.levi@gmail.com (Levi Morrison) On Sat, Aug 18, 2012 at 12:42 AM, Alexey Zakhlestin wrote: > > On 16.08.2012, at 0:18, Rasmus Schultz wrote: > >> How come there is no straight-foward obvious way to simply remove a given >> value from an array? > > Well, this sounds like a reason for creating SplSet class > There's already SplObjectStorage which CAN act like a Set for objects only. It's a terrible solution in my opinion and am working on creating a proper one. I don't know if that effort will be accepted, but I wanted to point out that a set already exists in the SPL.