Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77883 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72736 invoked from network); 11 Oct 2014 22:42:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Oct 2014 22:42:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.177 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.177 mail-wi0-f177.google.com Received: from [209.85.212.177] ([209.85.212.177:45481] helo=mail-wi0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BD/63-43359-072B9345 for ; Sat, 11 Oct 2014 18:42:58 -0400 Received: by mail-wi0-f177.google.com with SMTP id fb4so4790976wid.4 for ; Sat, 11 Oct 2014 15:42:53 -0700 (PDT) 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=npI4Nyx7f/fo2waanp157ElNJAlXL14TjwPEnpUOQQw=; b=prXJHUUW75uEzJ7LBzMuthnXVoUUEMWThWWgP4oD7y7McdOOKhGau4u3P4zLXx2MEq lYT2bk2JfwWZIrw9X0ik+TxqZjsAsodW5WKvwkDfMQaQ+r3MAH25yXaic2wQSNryNmON r3m8eNr7cq3LP19U6QLcb9ceJAsswmv/Ph7YnS3f4XoHlT/4Of/x/YvZHKaiD50Y0qZ5 5h1xc7tvMHNRqa41hpNAfENUM7TkkyrAWDCB7C4/OvPpg5iPoYHHsH8WdAtcgNtYGdJL biVQ6IU+T8XQELw/bgxbra5w6KIviQYcz1rIk8KC2Y7W4Z1s3Zuyz9IEV5GDFqhsCxWL 98OQ== X-Received: by 10.180.100.202 with SMTP id fa10mr12242190wib.32.1413067373313; Sat, 11 Oct 2014 15:42:53 -0700 (PDT) Received: from [192.168.0.2] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id u7sm6999209wif.7.2014.10.11.15.42.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 11 Oct 2014 15:42:52 -0700 (PDT) Message-ID: <5439B266.8070300@gmail.com> Date: Sat, 11 Oct 2014 23:42:46 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Deprecation of func_get_args(), call_user_func_array() and related API From: rowan.collins@gmail.com (Rowan Collins) On 11/10/2014 04:10, Marco Pivetta wrote: > That would actually be worse, as it wouldn't be possible to pass them to > methods with a `callable` hint or similars such as `array_map`. That sounds like a good counter to your own argument that there is no use-case for these functions. Indeed, there are plenty of use cases for call_user_func() and call_user_func_array() which have nothing whatsoever to do with variadics, so are as valid as they ever were. func_get_args() and func_num_args(), OTOH, existed solely to support variadics, and anything taking advantage of them being functions rather than a language structure would have to be quite exotic and arcane, so in principle they could, eventually, be removed, but I agree with others that it's far too soon to remove a feature which has been around since 4.0 just becuase 5.6 includes a better alternative. > In general, I understand why there's a lot of fuss about BC compat here, > but I don't see why providing them as separate file or using something like > a "global include" is a problem. Is/would something like that (be) possible > via ini setting? If they're included in the core distribution, then why make them optional at all? If it's just a question of how the functions behave, then surely an included (and C-level) implementation should be sought which has the better behaviour? Regards, -- Rowan Collins [IMSoP]