Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73962 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45787 invoked from network); 6 May 2014 10:31:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 May 2014 10:31:45 -0000 Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.181 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.128.181 mail-ve0-f181.google.com Received: from [209.85.128.181] ([209.85.128.181:41079] helo=mail-ve0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/36-04569-F0AB8635 for ; Tue, 06 May 2014 06:31:44 -0400 Received: by mail-ve0-f181.google.com with SMTP id pa12so9408015veb.12 for ; Tue, 06 May 2014 03:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=VCS6N+bMonLoo01i1nndVrHGR3897FAISbkvShpxI7o=; b=BPMu3xXTDjMqR7s5jJEN+TxB3GdbGsTBX0iyrLDsIqmVrECadt8daJZAYKrTg++92o P2bpexk+9RUQyZJnYhQzlTq3JPzLRMer1FtmzqbNe6e0ynEEwMLzPlbS2iN9P/AAkp7D Hlr0kdqiMoAMpg6jGqrr/UZpMU9wCLh7EWdFPh5+HvorhvZCnEBqnYBWpAeQVQnCKxTy 9ZvnREqokViNqu8OZzxe19+XTHys8iX+hTiQpFYsvqyDRwu6/ts6xfBGgapwOw5hRliH GBebxBuBfuW3dYszuTzqjh0c6C56L2kGaNnFpz4epLyfdkR4ftZ6t2hdIaXjBkhXJUyB 0/gw== MIME-Version: 1.0 X-Received: by 10.58.201.5 with SMTP id jw5mr31666381vec.6.1399372301010; Tue, 06 May 2014 03:31:41 -0700 (PDT) Sender: tjerk.meesters@gmail.com Received: by 10.58.133.84 with HTTP; Tue, 6 May 2014 03:31:40 -0700 (PDT) In-Reply-To: References: Date: Tue, 6 May 2014 18:31:40 +0800 X-Google-Sender-Auth: dih9Jz4Gfn-XYaF-gfSPxK7BIfA Message-ID: To: Dmitry Stogov Cc: Julien Pauli , PHP Internals Content-Type: multipart/alternative; boundary=047d7bd6aea2e910b404f8b8c0be Subject: Re: 5dee3c11 break From: datibbaw@php.net (Tjerk Anne Meesters) --047d7bd6aea2e910b404f8b8c0be Content-Type: text/plain; charset=UTF-8 Hi Dmitry, On Tue, May 6, 2014 at 4:11 PM, Dmitry Stogov wrote: > Hi Tjerk, > > your commit broke the code that worked fine before (still works in 5.5 but > broken in 5.6 and above). > It leads into infinity recursion until stack overflow. > > It must be fixed or reverted. > This has been mentioned by Jakub before and a fix to ZF2 has already been merged: https://github.com/zendframework/zf2/pull/6096 The previous code and my patch basically cannot coexist; it used to work in 5.6 before, but only by the "virtue" of an unfortunate implementation. I believe this is not the only 5.6 issue that ZF2 is dealing with, but if you feel that this breaks too many things for a 5.x release I suppose we can revert it in PHP-5.6 and keep it for PHP-6? Let me know. > Thanks. Dmitry. > > class Parameters extends ArrayObject { > public function __construct(array $values = null) { > if (null === $values) { > $values = array(); > } > parent::__construct($values, ArrayObject::ARRAY_AS_PROPS); > } > public function offsetGet($name) { > if (isset($this[$name])) { > return parent::offsetGet($name); > } > return null; > } > } > $x = new Parameters(); > var_dump($x['foo']); > $x['foo'] = 'bar'; > var_dump($x['foo']); > ?> > -- -- Tjerk --047d7bd6aea2e910b404f8b8c0be--