Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123259 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 626661A009C for ; Fri, 3 May 2024 06:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1714719096; bh=0b5QiVnhy+Qyd4mtfxAByQ0I35RPnRol+2fWWzXRI+g=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=ZsXq6rRfKb6Fnjr7IakP7vh6K55qGPYJq3Xayd5kRxB+E7fSAZ0H+AC1ong8JzNcS xtLSpTTfJzp9Mzpb2G+tKZlOuajGS9rwZh1ZEuCP4pxiX3+LwRHaVQE3jr4+VLqGZB /SeYXKTFx/6uUNfJPOPVVbROV0mlFM4ovYeh41LSwlfCKwmP56LVB19U+H0z+zX1H+ DPYN1m2y8fCoJA7hgU7qw9kJjfaIz20833k5jH3ZQGQ3hN0Jsg50ykKep/3iy0iHcT wUu0OZPvY06gKS8DXsKHDPZ8y0wr/RtV99JE7Og9IH6ULaLxXfNpUgL8N9uAiKysXe TbvVfln0OqcKw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 587D71806BB for ; Fri, 3 May 2024 06:51:35 +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,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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 mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 3 May 2024 06:51:34 +0000 (UTC) Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a51addddbd4so1054865166b.0 for ; Thu, 02 May 2024 23:50:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714719048; x=1715323848; darn=lists.php.net; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=isybEjACbLixZvgMCulE5YtLA7sfz/QlPsxC+kvNEXQ=; b=WwV8nG/Hyeb/I7KauMTk3Z8D++81lj+Wbrj0sIfTUx99r0f7mNgYqvUZlcaXvBZ5ri 3srrljiBauf24JFl2NX2eXinL2kxvzTSnbd+aJ3oi+zZpziHjjhricdxtMvCk2zFzE3d o9cNqfeszDbfwM4+k5yE718q4qHyDlfU+t5myO2w+p66Mn9OSyL1iut1ihZ9mhpVyGgp OpepGxjjp1G9MfpLx+QYA8x441+5g1paCgAv8u+Fv42j16NxjTDUMh0XlxRrTU45dcu/ cRzULc9SZry2Gwy6mrhgdCNcOGuKcAUXRguq/iD8IBAsFSmTo4jaMe/filwXxkV36Meh 8OOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714719048; x=1715323848; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=isybEjACbLixZvgMCulE5YtLA7sfz/QlPsxC+kvNEXQ=; b=F2vEBKtgasTxJxEziUmImu2q3Ij0hPdUukm/leOzcAUJWhlLzbPkczYZPJFFxvernt 7g3vXTm1A/BGiGPFArURY4fKpXhj2GnDcjGKXymw3ua2W6LB+iJ3+ZUtYLtTlru0f7J1 2ZCaQkKoqE5+JyszF1ogQlbDUOr9xHz19NsMk6AVXA1H96cqNxa4lR6QgBblHVuAT5AF 53ikdzXadKv1dQ79F2BFKQXyj/hh3S+aFreFhvT6ybWAASyOBpn3SflIt7n39JATKw4w SwMTILaVCMWyEXsrey+4wRY990vgHynhDNtCCykhBqg35bcHpZhGQg2c26CJQRiAluQR PS/g== X-Gm-Message-State: AOJu0YwTeFmCZ90Wkv36XnGtXvxYbZzi3uYc8k0JzE+MPVkSHyDfpKvY N/6A4f4EorOUX5ZJjBy9xCgtYI22YVqkSt0+fw5/pYwLO+z4Lu16I8I/ow== X-Google-Smtp-Source: AGHT+IHg8TQrvHB0sTmHUtBt89naqLKSPKHmhHROk4EKtBwDBV1KHMWDpIQNUtGNyt6AeG+z0FNauQ== X-Received: by 2002:a17:907:766f:b0:a59:70ea:2397 with SMTP id kk15-20020a170907766f00b00a5970ea2397mr884918ejc.58.1714719047908; Thu, 02 May 2024 23:50:47 -0700 (PDT) Received: from smtpclient.apple ([89.249.45.14]) by smtp.gmail.com with ESMTPSA id kt14-20020a170906aace00b00a5995900bd7sm223756ejb.192.2024.05.02.23.50.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 May 2024 23:50:47 -0700 (PDT) Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_54912002-73C4-4827-830A-FCE9D2342A13" Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: [PHP-DEV] Inconsistencies between parameter number and index when reflecting a method/function Date: Fri, 3 May 2024 08:50:36 +0200 In-Reply-To: <88ea5de8-22ea-4c23-b570-229acd546c10@app.fastmail.com> Cc: =?utf-8?Q?Bj=C3=B6rn_Larsson?= To: Ollie Read References: <88ea5de8-22ea-4c23-b570-229acd546c10@app.fastmail.com> X-Mailer: Apple Mail (2.3774.500.171.1.1) From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_54912002-73C4-4827-830A-FCE9D2342A13 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 2 mai 2024 =C3=A0 14:48, Ollie Read a =C3=A9crit = : >=20 > The question that is holding this PR back is should these methods be 1 = indexed, 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 remain consistent with the existing API. >=20 It ought to be consistent with the existing reciprocal method = `ReflectionParameter::getPosition()`, which returns `0` for parameter = #1. =E2=80=94Claude= --Apple-Mail=_54912002-73C4-4827-830A-FCE9D2342A13 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

Le 2 mai 2024 =C3=A0 14:48, Ollie Read = <php@ollie.codes> a =C3=A9crit :

The question that is holding this PR back is = should these methods be 1 indexed, 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 remain consistent with the = existing API.


It = ought to be consistent with the existing reciprocal method = `ReflectionParameter::getPosition()`, which returns `0` for parameter = #1.

=E2=80=94Claude
= --Apple-Mail=_54912002-73C4-4827-830A-FCE9D2342A13--