Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84143 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16434 invoked from network); 2 Mar 2015 04:44:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2015 04:44:17 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qa0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:65018] helo=mail-qa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/10-15700-0AAE3F45 for ; Sun, 01 Mar 2015 23:44:17 -0500 Received: by mail-qa0-f42.google.com with SMTP id w8so21222917qac.1 for ; Sun, 01 Mar 2015 20:44:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=dvNZDpgR2JxZYln+QIHK0i4vzwZn5DRt1xqCxonDpGY=; b=zM7rqUDZTvPYUr4I+FIT8XAQ/XCgylVKIj9WOqm1pLi5gcr5UZsULsPBjv021Ko9aL YOgD0Ts/RlXm3RudQZiiTejEwlSxRrDUy5u++3A01W2F+5fsDEzQezGpHsFqd2gvVoWZ xWoR5W3XdHaaEh1RI/Q8cRtGXRo5VSA5RTAy7avQx/GMjlommg4H3V8FFD91ETriq5Qd usgNtfnBChjkDnVZKbrzO6SS9wpYIfCamp2XIA3KI/CKllVYSs7M77sklqME0AkC2v/g qbeyvOeJ+9eztVDdRmA2CMmkuQ5sY6HFCyaKtPQ5aXDNPh3czkF4l/ACB/FGEr9BNaYL HAfg== X-Received: by 10.55.18.148 with SMTP id 20mr5018708qks.27.1425271453359; Sun, 01 Mar 2015 20:44:13 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.198.8 with HTTP; Sun, 1 Mar 2015 20:43:33 -0800 (PST) In-Reply-To: References: Date: Mon, 2 Mar 2015 13:43:33 +0900 X-Google-Sender-Auth: fWSXsqGhfyVn23IeevRE4trM2SU Message-ID: To: marcio3w@gmail.com Cc: PHP internals Content-Type: multipart/alternative; boundary=001a114737d0afa440051046de16 Subject: Re: [PHP-DEV][RFC][DISCUSSION] Strict Argument Count From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a114737d0afa440051046de16 Content-Type: text/plain; charset=UTF-8 Hi Marcio, On Mon, Mar 2, 2015 at 8:02 AM, Marcio Almada wrote: > I'm moving the "Strict Argument Count" RFC into discussion phase: > > RFC: https://wiki.php.net/rfc/strict_argcount > PR: https://github.com/php/php-src/pull/1108 > > Many different opinions were collected during research phase and the RFC > was updated with real BC break measurements and other important sections. > So, before discussing: > > - Even if you already read the RFC in the past, read it again now. > - Don't claim **possible** massive BC breaks before read the > measurements already done. No matter how seasoned you are with PHP, real > numbers matter most than assumptions. Your measurements are welcome too. > - Try the patch. Really. > - Consider reading the use case present on this post: goo.gl/3ykdIy > - Keep discussion on topic and remember we are all trying to improve PHP > in some way :) > I like the idea. /** fn expects a variable-length argument lists */ function fn($arg) { $arg = func_get_arg(); $args = func_get_args(); } fn(1); // Ok fn(...[1, 2, 3, 4, 5]); // Ok call_user_func_array("fn", [1, 2, 3, 4, 5, 6, 7]); // Ok I understand motivation why your patch behave like this. It's for BC, right? However, isn't it better to declare variable length parameters by function signature in the long run? function fn($arg, ...) {} Is it possible to have E_DEPRECATED error without "..."? and do not care about func_get_arg*() existence? Make E_DEPRECATED error E_WARNING in PHP 7.2 or 7.3. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a114737d0afa440051046de16--