Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122939 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 0375C1A009C for ; Thu, 4 Apr 2024 15:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712246253; bh=doh0VURMRMJeNsvqSdX88QqvSi8JlzrBbyISX8hwgUs=; h=Date:Subject:To:References:From:In-Reply-To:From; b=eG6iThudpoKVmyRvXGVP+OGM30B4ql99VQQ6vmU43+xKfLoPW+Tvdgas3jBoGI5BB 33BtpI04ZYpww9/dycKD3IUxjF3wGL1Inm0IxI/elV7nU3hh6u7CBpYBY+VdVLLuC3 h6id3KZtHIyPPU4uartsGU0otaxx3P/+Fl6SMaJ2gEhpwbZR0q/Z+7wsNplOmnrmqS HUpB7LdFAr631CphdydCnITMfw2nORDxX0dQWVa6fDUjbwSS4hSj26B3s4m0M54OcZ LkpMkBpRNTMxR+y9UjvO/yl3dka29H8kMssPZiG7bhEJpb/i2USvJitjaWVNa0Fpjy XJGxnZ0pFopZw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 84B99180593 for ; Thu, 4 Apr 2024 15:57:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 4 Apr 2024 15:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1712246223; bh=p+GjYs9dmHyqrDQ1YsoebTH33nyYrdrn6t5XLIMweoY=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=g7EjWIrZC+U9AHMKzlIAdvvX9G+QrpqgvFdxP3/CgNata/f7VLNOsRykZuHjhRbqR oqeIv+ebF5RSP+FCOVMraFpUIgtZQh6+Tn+CskC/hjXrN0rpXI+l1cbTNCSE1EI7eu arR6aefB1A/eS6HPUvqnJUWUO7DgD/8Dd3N4rfHIHGxwNnuvTilzhcTNhqfX4W+SQp 3RFt5xBdzQv8FGRwB9P1Cdo5WE4odsZP3Xb7Ylx6Ja9XQk0/F5swHW80mpgT5ndOEB YMG5zO436TIzA4/26sTe94nSOzCP2O5xfRsMm74o3wdWTSgAo1iO3TT+bN8WxNwRgf 4XP5PtDjncCsg== Message-ID: <989e3e13-48ee-4970-8485-f79bb70ad37c@bastelstu.be> Date: Thu, 4 Apr 2024 17:57:01 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] RFC idea: using the void type to control maximum arity of user-defined functions To: Pablo Rauzy , internals@lists.php.net References: <6299b649-c19b-4172-9632-2ef0a55d256d@uzy.me> <7B32AF65-CA40-40F5-BA59-CB5180EC4D7F@gmail.com> <8f71d807-78e6-49f6-acc7-b1fc09d815ba@uzy.me> Content-Language: en-US In-Reply-To: <8f71d807-78e6-49f6-acc7-b1fc09d815ba@uzy.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 4/4/24 16:36, Pablo Rauzy wrote: > I strongly agree in theory, but this could break existing code, and > moreover such a proposal was already rejected: > https://wiki.php.net/rfc/strict_argcount The RFC is 9 years old by now. My gut feeling is be that using an actual variadic parameter for functions that are variadic is what people do, because it makes the function signature much clearer. Actually variadic parameters are available since PHP 5.6, which at the time of the previous RFC was the newest version. Since then we had two major releases, one of which (7.x) is already out of support. I think it would be reasonable to consider deprecating passing extra arguments to a non-variadic function. Best regards Tim Düsterhus