Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123194 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 A763A1A009C for ; Tue, 23 Apr 2024 20:22:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1713903787; bh=trzPqrlHbpuxIy7vfEZl7nRyqWeFq1u2LVWRMyMOWe8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=PP2VVmEgBo0MsGniAk2q8LFEDCN1eed7YwjK45whOUyEbuRi+ObTtyUJNXpOFjD6n 0jdH+I0hNRDNWMkjSENO1C3rljLvt+T2N9HQZd475ZSlbkMDjRh2eGvffjJI0XdLez bvvdIM5doCNEJXCkU2ZGmLoQLTGXSYHFwillK99hEVplsYOBe+n9SvKzb3VSALwo3c vTM8s+fvLEejRSHCeS0ZjowNTHMMT6W5KtMmem0+7ILMC132sgvkjWpcELgRbgHoA9 TXbpUZ1TrHJUMPx5ZKaKrwV91nIviGNbDLENFniJOibwIKpxbyemUKVNpnhZHUJNB2 BZ0UmPbZEq/5w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F293B1807A6 for ; Tue, 23 Apr 2024 20:23:03 +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,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-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (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 ; Tue, 23 Apr 2024 20:23:03 +0000 (UTC) Received: by mail-io1-f49.google.com with SMTP id ca18e2360f4ac-7de80bc1f84so41383339f.0 for ; Tue, 23 Apr 2024 13:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datadoghq.com; s=google; t=1713903742; x=1714508542; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ID4cU5MBxWkmfstexbWmzjppmgwZWVgizv4aJLSaBCE=; b=X5+MoRXoJg3RO8B3aUEgIH43nURKgFNSPsJw6hfZfb/eizMHpQgvOfuG8uLlzE+a6e EEDi9qXehb6GlvLcQTinYcU3fEPyIXUzl0n93FamPGfxlUGi/IYxsLGsmPQMMCHc2tgU t7G0NQVeP3xiXsfQvYUXnOHQCff+1lF1StDT8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713903742; x=1714508542; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ID4cU5MBxWkmfstexbWmzjppmgwZWVgizv4aJLSaBCE=; b=AAOzgg1aJy2/aHtQ7utAA4QdjOcETje8BlbDJwHNnjT4aFtNPndRIeekf3KYb8XkiF b+E63a0k+S1KwAHjCJlR2n4ei9ozKsUJffKc9nGqYvh6nKpDOixUkuHRhjcSzxVS2wGJ gctXaP/dCRW4UZTYGTZxx2jZBmDvAPVcfNR95wDIm+VjIJciJWpSukEQCtOuOgrAQ5lv 0LopcBpFkihaMW5dVRrOpuyG133mt5ll9+c9h55q3y3Z/4H6vj+mps0jTXIYU4nBaRF2 FqGsTaLNIO7dtSg7BPXIsXlomXjQetuwc/drglyrwPxPL9ZAj+iNpkuoK37GVOuuAKni PIXA== X-Gm-Message-State: AOJu0Ywt9oBfWO+5XvN6UjP01qrMSc4vQV87O6pykz/RsVdAiedbvGr8 rH+ftbWCGRRnb7DAoXitUOLPThXP4zGOv7Qr/TIL3OdEac1jfFKvHLGyWTEhuU0YVBaZKdlh/YE iTnVWTiXlvweSk/aHmEudMzLDdD4BZewN8K+8hTRR8i9/QRWHYBKwaw== X-Google-Smtp-Source: AGHT+IFYEIB/HRNTmZXIaPoCJIm2u6SiqjjJosCgESm5+KaXfr9BO7MrXD+6SSvVCBFN8K3uLthShvd8AP3jjdln2k8= X-Received: by 2002:a5e:8b46:0:b0:7de:89ed:8bcc with SMTP id z6-20020a5e8b46000000b007de89ed8bccmr617985iom.18.1713903742535; Tue, 23 Apr 2024 13:22:22 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <24e4529d-0b75-44de-90ef-34de5dfb1c99@wcflabs.de> <278889be-82ab-4827-a9e7-801b5ba2d8f8@app.fastmail.com> <06373f2b-5de0-4582-96c5-29c3b474c01d@wcflabs.de> <45e6365b-4963-4969-8cc1-80bae6922fc8@wcflabs.de> In-Reply-To: <45e6365b-4963-4969-8cc1-80bae6922fc8@wcflabs.de> Date: Tue, 23 Apr 2024 14:22:11 -0600 Message-ID: Subject: Re: [PHP-DEV] RFC [Discussion]: array_find To: =?UTF-8?Q?Joshua_R=C3=BCsweg?= Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: levi.morrison@datadoghq.com (Levi Morrison) On Tue, Apr 23, 2024 at 1:53=E2=80=AFPM Joshua R=C3=BCsweg wrote: > > Hi > > On 19.04.24 21:20, Joshua R=C3=BCsweg wrote: > > I definitely see the point where there is an advantage to having two > > separate methods and can definitely understand that it is easier for > > developers to understand the control flow without evaluating the > > parameters. > > > > I'm unsure if that's really necessary though, because basically it's > > probably not necessary to directly see what exactly the function > > returns. Perhaps there will be another opinion on this in an email in > > the next few days. > > Now that I've thought about it for a few days, it's really better that > the whole thing is broken down into two methods. I have adjusted the RFC > accordingly. The RFC contains now two separat functions `array_find` and > `array_find_key`. > > Cheers > > Josh The RFC looks better to me. The [Unaffected PHP Functionality][1] section looks like it needs updating, though: > This RFC only adds two new functions and an enum to PHP and > only affects previously defined functions which are named as > the proposed function or enum. I don't see an enum in the text nor in the git diff. [1]: https://wiki.php.net/rfc/array_find#unaffected_php_functionality