Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24395 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71799 invoked by uid 1010); 15 Jul 2006 13:19:09 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 71784 invoked from network); 15 Jul 2006 13:19:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jul 2006 13:19:09 -0000 X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:36928] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 52/77-11992-C4BE8B44 for ; Sat, 15 Jul 2006 09:19:08 -0400 Received: from baumbart.mbo (dslb-084-063-002-216.pools.arcor-ip.net [84.63.2.216]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id 922FF35C1F0; Sat, 15 Jul 2006 15:19:05 +0200 (CEST) Date: Sat, 15 Jul 2006 15:19:10 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <58088415.20060715151910@marcus-boerger.de> To: Matt W Cc: internals@lists.php.net In-Reply-To: <00b301c6a80c$85dc7790$0201a8c0@pc1> References: <009a01c69848$06f22e80$0201a8c0@pc1> <009f01c69cf9$6b493f30$0201a8c0@pc1> <1772356126.20060701125346@marcus-boerger.de> <008701c6a014$ec07ebd0$0201a8c0@pc1> <56141794.20060706101753@marcus-boerger.de> <00fe01c6a4c7$909ad070$0201a8c0@pc1> <1924756948.20060711203719@marcus-boerger.de> <00a201c6a667$147d5c00$0201a8c0@pc1> <271761716.20060715122437@marcus-boerger.de> <005b01c6a801$5e71fc80$0201a8c0@pc1> <26705546.20060715141440@marcus-boerger.de> <00b301c6a80c$85dc7790$0201a8c0@pc1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] array_fill: Allow an array to specify keys From: helly@php.net (Marcus Boerger) Hello Matt, Saturday, July 15, 2006, 2:45:16 PM, you wrote: > Hi Marcus, > ----- Original Message ----- > From: "Marcus Boerger" >> Hello Matt, >> >> thanks for the update >> >> best regards >> marcus > No problem, but... > HEAD looks good now (meaning how you guys want it), but there's an issue > with 5.2 -- fill and fill_keys will handle "val" passed by reference > differently. Either fill_keys needs > if (PZVAL_IS_REF(...)) { > SEPARATE_ZVAL(...); > } > added or that part removed from array_fill to make them behave the same, > right? (This is just 5.2, HEAD's fine.) Well the code is equal now. > Also, again, with both branches, if you're allowing array_fill_keys to > return an empty array (which I support), shouldn't array_fill be changed to > do the same? > You want consistency where it's expected, right? :-) Hey, well yeah. I had to read the code more than once to spot how it works in detail and do not particular like the limitation in array_fill(). I rather prefer to change that or live with the inconstistency here as the functions more or less do something related but work completley different and have a very different signature, don't they? Best regards, Marcus