Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83639 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24273 invoked from network); 24 Feb 2015 07:44:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2015 07:44:08 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.45 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.45 mail-pa0-f45.google.com Received: from [209.85.220.45] ([209.85.220.45:41202] helo=mail-pa0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/13-09240-6CB2CE45 for ; Tue, 24 Feb 2015 02:44:07 -0500 Received: by padfb1 with SMTP id fb1so34106142pad.8 for ; Mon, 23 Feb 2015 23:44:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=A2B0cR/JR6UhNC/7X4EYGmGXS8WNw90eByOXAGXe66c=; b=xY1Tb1e+8gVAFtPHorxcz+D4HWrItRlWIL6j74OwyHXu4oNXP8Qry+9KH/URtfqU8o aHaYSqHk+rdDh/H73sGS1gxCPgTX0qmok0aEUXwxoOHC59hl/to6vQwqYOiMMIvZixpv yJlLv0eiJ3SzkbsNIT6PoKJLzo12er2UodSH1TatCHpeyrM2uBN2Fgc1nRSuepK6QEuL vCZY5P3gJBf3yCur+gFjbo0YGD8cpHLnTeuDe+RX7tY8wJr62xReDGiFl6dpLQAZt4ca EFF1RvOURW6XdrAc/QhzOXwQQR/nir7UyFnLuAWDfKb9I0kbMPDGaFmC5DRlfZkB36D+ fYqg== X-Received: by 10.70.64.131 with SMTP id o3mr27265563pds.146.1424763844330; Mon, 23 Feb 2015 23:44:04 -0800 (PST) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id bx10sm38348622pab.25.2015.02.23.23.44.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Feb 2015 23:44:03 -0800 (PST) Message-ID: <54EC2BC1.9030204@gmail.com> Date: Mon, 23 Feb 2015 23:44:01 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Marc Bennewitz , PHP internals References: <54EB8043.7050108@mabe.berlin> In-Reply-To: <54EB8043.7050108@mabe.berlin> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Proposal: deprecate undefined passed arguments From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > So because of the described issues with the existing code base I like to > propose the change to no longer ignore undefined arguments and introduce > E_DEPRECATED messages if a function get's an undefined argument. So the > user get enough time to fix their code before throwing errors in this > case in PHP 8. I don't think it is a good idea to break all functions that use func_get_args(). To have a BC break, there should be a larger improvement in the functionality, compensating for it, but here no functionality is added, just removed, and removed for apparently no reason besides trying to be "more strict". I know that's some kind of fashion lately to introduce limitations in the language that add nothing but "strictness" but frankly I see no point in this one. If there is some perceivable improvement in easiness of development, or some added capabilities which are enabled by this, or some problem that was hard to solve before but with this change is easy - please describe it, so far I didn't see it. > As this should be consistent over the engine I would propose this change > for user defined functions and for internal functions as well. If you are worried about consistency that much, I would propose removing warning from internal functions, since it is not very useful for any real purpose anyway - extra argument does not hurt anything, just produces annoying messages. > Again, yes this one would introduces one more BC break but first this > would be deprecated before disabled and next it's for reducing BC in the > future. Deprecating is not a magic trick that makes BC breaks OK. Deprecating is a way to handle BC breaks, but it doesn't make it any better so it can not be used as an argument for BC break being more acceptable. *If* BC break is warranted then we can talk about how to do it, i.e. with deprecation, etc. but for that we need to first decide that the break is OK, without relying on specific process for achieving it as an argument. Also, I don't exactly see how it reduces BC breaks in the future. BC promise does not include a promise not to add function arguments. -- Stas Malyshev smalyshev@gmail.com