Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123193 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 D1E8F1A009C for ; Tue, 23 Apr 2024 19:53:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1713902032; bh=XZ2kcby3EyRVSPqKlLwEmUeZtUH2NKXW7qhicm4ogtY=; h=From:Date:Subject:To:References:Cc:In-Reply-To:From; b=nxP3pW9mpm0FzclZ7v93E5VbziJHCqMRb0b4IrAvXH6/0+OsIHggpb1mEYpu1g5QP vcdp5vWF4DqB7iGXBuvff831yMiP9ZTWIbDOjzTJPk+ywLeJjzSEx4HbEM6JpJvNi6 OOOsTtum6/nFjdCNwa0gPe0vSI2z7S2gVXppxcBTgYBpC2nxtK6+PdN1Z9SLjlBaW1 HXZ7Pi3eeqH1rLobgxWCat8d0D1aas/xivkqBm+lzzjhXNTf/Go2eXIyfy9IVn44SP vUJI+YXK6KhFyoU2OIwu1GnaoxL2DegcZtOovcqWuNZFZn9YeqxhUl/HKhGlRVya8+ ah1VjtsjdEW5A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 28C1B18081C for ; Tue, 23 Apr 2024 19:53:52 +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-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (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 19:53:51 +0000 (UTC) Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-565c6cf4819so396833a12.1 for ; Tue, 23 Apr 2024 12:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wcflabs.de; s=google; t=1713901990; x=1714506790; darn=lists.php.net; h=content-transfer-encoding:in-reply-to:cc:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=JUP1p7FV9CTYbVPAtXIPTnYFFGytG/z+4isyn2UPktc=; b=ExRok2ZGtxOvqzWMja54flpE+8KubgFW3V7rFuWYndX0Npu/liZqiTkZrnDMEEiiLc EqI3iirEf6XJPlYvWYoMJKtQ6R4tNQfSWJrq0eeq3UFAmRsXi+Avyibcz8mbiKHFPuVy RxGyrWE2irlmyhA35OZPluzXhSV/yDxm6sZQWuEedVhoCGOtdWV+Q0D7VfGcqdptfRPe xxvGOqgG1DRtc5BEesOzjx89nTbo/zNJftLdkszy5lCFXX+OHjC9LkUNvbI8o1tq7q0+ CJxdOoG0lGJqDX0DYM2/1sFFcALf0PtTbvtSDzt+sgr2Gsuwn8XMUxishVMunPZZ5L/u Qemg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713901990; x=1714506790; h=content-transfer-encoding:in-reply-to:cc:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JUP1p7FV9CTYbVPAtXIPTnYFFGytG/z+4isyn2UPktc=; b=UeA/SbshJBs5bCR9XsXpnApuDoScSaqVzi4mOy0SUEDz9ZqlSJt/DYmKFkfYgDf9ic TziDucw8s9r6t0Yp8RL6hChv87ItLvOogGcB9L8utMy2UXiqvLcyLcJWBVZYdGzbPQr5 PO+bxIe8R+iTa8WOxeHkNXgsc7E0eiIHLcZyQcuRyGALHRJ+i3VyYJ1Ph77PUa2CHksk ZvYtjVF/1t3m9bhW6edZnyz+zAgvC2xz/Xl8Gy65eBPcCUlzafHwc/mw960MjQ9zjwLJ ui7Hwm9p8ByAK0Zfa/f0bNRWiY4V+O1fpo/heFfD5zS+PLxCxBhXLGJzApMbwnUkoi8D bhzg== X-Gm-Message-State: AOJu0YwVX30XmX9i9SSTju4wXnufbyKVLeEmt11W5qcGiMtQC0abxKCu 5bLVlk26MujnROqNnHWtirWShMWzGJkUDey+W0wNqqTjqxF+BIoKdU4Rr6V5gxwgmbbIHWaEqhY f8Qc= X-Google-Smtp-Source: AGHT+IEnx0msW70RIxISqrUqO0LKyb2hGTI0YpVRWwDQx2xkc+/P1Okw0IORfb+r08UMa8yqd7ORjg== X-Received: by 2002:a17:906:349a:b0:a55:af31:bed7 with SMTP id g26-20020a170906349a00b00a55af31bed7mr469746ejb.9.1713901990058; Tue, 23 Apr 2024 12:53:10 -0700 (PDT) Received: from ?IPV6:2a01:598:c000:4af0:c84e:88f0:939:200d? ([2a01:598:c000:4af0:c84e:88f0:939:200d]) by smtp.gmail.com with ESMTPSA id le23-20020a170906ae1700b00a4e4c944e77sm7393473ejb.40.2024.04.23.12.53.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Apr 2024 12:53:09 -0700 (PDT) X-Google-Original-From: =?UTF-8?Q?Joshua_R=C3=BCsweg?= Message-ID: <45e6365b-4963-4969-8cc1-80bae6922fc8@wcflabs.de> Date: Tue, 23 Apr 2024 21:53:08 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] RFC [Discussion]: array_find Content-Language: de-DE To: Levi Morrison References: <24e4529d-0b75-44de-90ef-34de5dfb1c99@wcflabs.de> <278889be-82ab-4827-a9e7-801b5ba2d8f8@app.fastmail.com> <06373f2b-5de0-4582-96c5-29c3b474c01d@wcflabs.de> Cc: PHP internals In-Reply-To: <06373f2b-5de0-4582-96c5-29c3b474c01d@wcflabs.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: josh@wcflabs.de ("=?UTF-8?Q?Joshua_R=C3=BCsweg?=") Hi On 19.04.24 21:20, Joshua Rüsweg 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