Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66257 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40311 invoked from network); 26 Feb 2013 20:35:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Feb 2013 20:35:17 -0000 Authentication-Results: pb1.pair.com header.from=pencap@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pencap@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.170 as permitted sender) X-PHP-List-Original-Sender: pencap@gmail.com X-Host-Fingerprint: 209.85.210.170 mail-ia0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:62213] helo=mail-ia0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 62/78-16132-38C1D215 for ; Tue, 26 Feb 2013 15:35:17 -0500 Received: by mail-ia0-f170.google.com with SMTP id k20so3935041iak.29 for ; Tue, 26 Feb 2013 12:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=GGHhQ5OulRQpYOBzbWepMz7V/JqE+dlPjwYBNxZvY2U=; b=z+QG5aqpqL9ZZHuJNW2b3BqIMyQKPoQytWuvk+UIzZDL0KMjDBRv+SIPlGk1tA2D1O nah2r/cVLbAY4wsLr4YPKmZzJOkxbjISIQwRvjj+KYuhlQmqStpcWse4Wg0AzR9RR8cm CGA6nKzI6lEiUvPSAIQ6/Oe8q1MbOmjYotWDS8Dc/TxaKgD9xu5GJCSXjmuLWFLaPAux vDVD4+fEcQwVGsq6JVnKTAcMuFf9ohGlNEUdwcDfYJTuAd58n0rxL4E2VB5BRzeedNxC XNtlsnMXYa2JorDdLXRPF7fk5cfp2mlQLgjtRXS3cq8l/WE9w/dnGln/WhCIaYHu7Cxm 6qsw== MIME-Version: 1.0 X-Received: by 10.50.222.195 with SMTP id qo3mr6087204igc.14.1361910912793; Tue, 26 Feb 2013 12:35:12 -0800 (PST) Received: by 10.50.85.232 with HTTP; Tue, 26 Feb 2013 12:35:12 -0800 (PST) Date: Tue, 26 Feb 2013 12:35:12 -0800 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=14dae934088d2c953404d6a69846 Subject: ArrayObject Fix: PR #289 Bug: #52861 From: pencap@gmail.com (Mike Willbanks) --14dae934088d2c953404d6a69846 Content-Type: text/plain; charset=UTF-8 Hello All, The reference issues I previously noted were mostly about unset not being a proper write context when the ZE is tricked into thinking it is a reference; this is used for both write and read write but not unset. This causes countless issues where you are unable to unset a multi-dimensional array when using ArrayObject. You can do it IF and ONLY IF each sub-array is an ArrayObject but in the context. You can see how the bug works here: https://github.com/php/php-src/pull/289 If at all possible it would be fantastic to have this fixed for PHP master, 5.5, 5.4 and even 5.3. It causes a bunch of pain in userland especially if you override $_SESSION with an ArrayObject or any other object for that matter. In ZF2 this has lead us to creating our own implementation of ArrayObject simply to workaround this type of issue by using ArrayAccess and subsequent friends. This has its own drawbacks and issues. For instance; assume that you are setting a multi-dimensional array on ArrayObject: $ar = new ArrayObject(); $ar['foo'] = array('bar' => 'foo'); unset($ar['foo']['bar']); This would now fail and not remove the data as well as issue: PHP Notice: Indirect modification of overloaded element of ArrayObject. Since this is not a BC break and a bug fix that does have quite a bit of impact it would be very nice to see if it can get fixed. If not for PHP 5.3 (which most people are using as a LTS version), 5.4 would certainly be a good start. - Mike --14dae934088d2c953404d6a69846--