Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123255 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 A6D841A009C for ; Thu, 2 May 2024 20:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1714682059; bh=2q1IM+fjs6Xz2FKWQyqMG54m7Yv+/786m2IVzw6Jl9w=; h=Date:From:To:Subject:In-Reply-To:References:From; b=SpF8CXQ1IIliL6hVCCB3R03MXdqcWKx3aT2G81PArp9sX58PIXS6v5rxJdzT2ffCW 3h5LjQZYcZ2d6NSn3SlJ9mVFfp8XgNWkaU0Vdx2gEUWs8V8mPE0XcyKcwABWxhzo5l d9MsqZ4jA7+OD517zPi7SLmyRZO2yD3eGOie6kh+T2Pt5ZRT6jBCyOC0DCZ47+697b v8rXRi3IplLbj9sXVa7Kf0t+uLSJd15SlTXZNpL9z9JeGxYu1uZMlh8DiZtNFQMKsZ 5EwCm6Y0mRpY16bIcmcdGgf4pYXEnt5FATcmpY6Oq/ZwUB71aWLAf07aEiAcACykMe t3+/MQwlDjJeQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0E9BC180039 for ; Thu, 2 May 2024 20:34:19 +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=3.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,SPF_HELO_PASS, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) by php-smtp4.php.net (Postfix) with ESMTP for ; Thu, 2 May 2024 20:34:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1714682012; bh=2q1IM+fjs6Xz2FKWQyqMG54m7Yv+/786m2IVzw6Jl9w=; h=Date:From:To:Subject:In-Reply-To:References:From; b=WzPyf9ArQcDkiCpdXzAfdcU2MmmxAghdtDNuinVDm8wCPZgqw/u5ObSFP9A7+M8ct j6PbPVALtDs5k3Z+UwICfE4SIL3H5DmBYHBYYuvxWBApLPnDXkWwpzuixKuPpmxJOp O2igJlr4jZTDPWLDRRvbOpgbahZnz0UGcJiYmL/ZNM2vuGihTlZbxv/3kJXbPgco7L uhc0b4QUwgpTCMdu5IuX6uZe+OIdQMab67dLXKE+4t2ZW8ilSk6spKNCpHu0xnZzqx 7OMXWmSdgWq5/89PV+8nc0Q50F+3Q7BdnOabqdinxM2ATQWypvuPXfbDn2otybsToJ Tc1ICMdpek6Lg== Received: from [127.0.0.1] (host86-135-208-250.range86-135.btcentralplus.com [86.135.208.250]) by xdebug.org (Postfix) with ESMTPSA id 1C15210C44D; Thu, 02 May 2024 21:33:32 +0100 (BST) Date: Thu, 02 May 2024 21:33:33 +0100 To: internals@lists.php.net Subject: =?US-ASCII?Q?Re=3A_=5BPHP-DEV=5D_Inconsistencies_between_parameter_n?= =?US-ASCII?Q?umber_and_index_when_reflecting_a_method/function?= User-Agent: K-9 Mail for Android In-Reply-To: <88ea5de8-22ea-4c23-b570-229acd546c10@app.fastmail.com> References: <88ea5de8-22ea-4c23-b570-229acd546c10@app.fastmail.com> Message-ID: <28215C90-191D-4159-9C47-86D03B9A683D@php.net> Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: derick@php.net (Derick Rethans) On 2 May 2024 13:48:36 BST, Ollie Read wrote: >These methods accept an integer to retrieve a parameter by its position, = or a string to retrieve by its name=2E So far, I have built this so that if= you required the first parameter, it's parameter 0=2E I treat it this way = because the only other place where we deal with parameter indexes, is Refle= ctionFunctionAbstract::getParameters() which returns the parameters zero-in= dexed=2E > >The question that is holding this PR back is should these methods be 1 in= dexed, so that the provided position is consistent with the error messages,= or how a person would typically count, or should they be 0 indexed to rema= in consistent with the existing API=2E 0-indexed, as that's what PHP does everywhere else=2E=20 cheers Derick=20