Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105931 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 6957 invoked from network); 14 Jun 2019 20:15:20 -0000 Received: from unknown (HELO mail-vs1-f51.google.com) (209.85.217.51) by pb1.pair.com with SMTP; 14 Jun 2019 20:15:20 -0000 Received: by mail-vs1-f51.google.com with SMTP id q64so2274024vsd.1 for ; Fri, 14 Jun 2019 10:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0Ip5tWRrCsgjUsi+DjUVEZNFckGGUvj3269qFCMyY2A=; b=pj5tnqEL+X9KI+5s5fef4r4gPCt6Fo2lGYQHgQrcETTqiL+vK0tl1c2GQcr0UN/h3i YempWPp7YvaB+0hr++d7yY1EZNn8R8Fr14l3MvwcJk+I4/d3XFYsvC+m/jTYOJ5KjHv5 3Er3UQxdn69XWBZo91Vmc9JB8PXOnjkWb8QszZiGCjV5SLQGGXlKbixrs+3vAF4M2PPH HI24a/BbtYyAdkv89ep9pIfVa0H6wAOKLUvmgTrdKo/bsLGMDcLBFMA4Rp/CyV3++j2O CnNB2yrDpmy9BBLf2goqnPVMIKcqR1ydyHruwYPiWC1YGw+EdfKJlytsAYuzyuGGujyq riHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0Ip5tWRrCsgjUsi+DjUVEZNFckGGUvj3269qFCMyY2A=; b=owN2EULK8MBqlzeve9gx4ERJKgc4yXLeMdvR9iWbJj1kLAdaVES7oIrfG/cGw0m9jx dCHg9o9xFK/QuPnJb4V8RaB4MQekvRlgKD6yHizqlJAn66YNsqDatQWR+r2pcfypeJ65 xXo+k2ykL2pou+AKAOHvVoUzffo/6/nwwrIOiWTOkretpegqp88yAL0j+CCDAoaWHPmA 8nyP9A8fkuZzkawxqSU6ilrUbMYVaHrFhUTjHeplVRggI/COrvGFD7+x9PJ992YBxzb5 YkjcYBQnOafXymHOisBalKcVmKVjuvBJ3qMsxmSSeAHFwlCHH6d7frHMW1Gyr3C0obm8 F60w== X-Gm-Message-State: APjAAAW+n8GooSQfneeO4J6e6IsVS4qIdOFtTv4WTpBTreSDnhIViHcz L2laetjvKV8zQAG4ym4DqvnSf/zaBwaHlRfGa9M= X-Google-Smtp-Source: APXvYqymBlM5GLd+BIWF3u1zL+MtAhsCKmDr8GBhriAlW7XPIP0N96EhwHFFXTe/6Om3BlLuiPpIoh/Dv9i4HAxZTPg= X-Received: by 2002:a67:7c4d:: with SMTP id x74mr45352512vsc.28.1560533326978; Fri, 14 Jun 2019 10:28:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 14 Jun 2019 19:26:36 +0200 Message-ID: To: Sara Golemon Cc: Benjamin Morel , PHP Internals Content-Type: multipart/alternative; boundary="0000000000009d67bd058b4bfac7" Subject: Re: [PHP-DEV] Allow zero parameters in array_merge()? From: george.banyard@gmail.com ("G. P. B.") --0000000000009d67bd058b4bfac7 Content-Type: text/plain; charset="UTF-8" On Fri, 14 Jun 2019 at 19:21, Sara Golemon wrote: > On Fri, Jun 14, 2019 at 12:15 PM Benjamin Morel > wrote: > > > I'm wondering if there's any reason why array_merge() doesn't allow zero > > arrays to be passed? > > > > array_merge(); // Warning: array_merge() expects at least 1 > parameter, > > 0 given > > > > It would be reasonable IMO to return an empty array in this case. > > > > I don't see any issue with this plan. I say do it. > > -Sara > Already the case in PHP 7.4 See changelog: https://www.php.net/manual/en/function.array-merge.php#refsect1-function.array-merge-changelog George P. Banyard --0000000000009d67bd058b4bfac7--