Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127811 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 lists.php.net (Postfix) with ESMTPS id F288C1A00BC for ; Tue, 1 Jul 2025 07:24:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1751354556; bh=mEW3vstLJjtM2gBgnVwzyXQeRXy82/yF5rDGOa7J0bI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YqFtzgLejDk3oqqxEkyyGZMmp+wRSkD+oQrkvls2KKRJht4sJNmY6tLmActCh6eSs NV6YzAl0dy+Q6uT5WO21nDOHYmXOPXqun7ABZZUcNR7r97F6P/ROqlpEf7obENFLbO GlhqKupIcdMH6j0hgUbjA8jfiaw7QkD8VlDY3pvw7cxV4IcF9aibSo7TUrZ3cTvpzW sOcc4ImCOUHt/rH5Azny0u2ft6+mhIUXdWSPiRZdjNCysg110vtqYBuTfTYDUp/NMi /ovDT9kWrl4T4/DLjbd8gFgYluXUx1yc0OAjIWpKBjdrjloghOnTQe1Gd+LZGuKyat x0QnqWHcrjJ6A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8CBA6180047 for ; Tue, 1 Jul 2025 07:22:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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, 1 Jul 2025 07:22:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1751354666; bh=GAL6h/8l7jWklaPqV/jOxRNoQeDDnY416UPdojpAFAU=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=flfVGIglMt1x41e+4abz+/pHxiojFu6NE21dYz9/KTHVUin9KaMgrhatFmwO+I9EJ 0uuwiKjy3MKWff6A33yErX/wA/gYckSkDopk61ADmodpD/cvNdYIV+3PXAq+ZE1wEy j6lliZVJrd2sGOaxJxVERuT+7Gu3IKf+tIhCIx8C1cXM+1r0rZJv/KBE09Ynt1Pxuh xV0Xxjn334yI/K7yXBIkoTY05MgSMJrpgRN4blGvJBZGGeUukTjimgWVYSDQPlCOOt W0ocpiDlAnWNU8ltXPfytBXQCfkcPRTY8vvEQYC9jxyNn/SCSX2hplpxN0URL6yipU AGnXy3c1B2PVg== Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Tue, 01 Jul 2025 09:24:26 +0200 To: Adam Cable Cc: php internals Subject: Re: [PHP-DEV] [VOTE] str_icontains In-Reply-To: References: Message-ID: <0e13771dc08c4a7d880c1fff46d21bf0@bastelstu.be> 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 Am 2025-07-01 09:01, schrieb Adam Cable: > Voting just opened on the "str_icontains" RFC. > > Please find the following resources: > > RFC: https://wiki.php.net/rfc/str_icontains > Discussion: https://externals.io/message/127667 > PR: https://github.com/php/php-src/pull/18705 Thank you for your RFC. While I initially said “seems easy enough” in the PR and I also believe that making the function ASCII-only for consistency, I ultimately decided to vote against the RFC. My main reason is that I do not like how this function is added in a standalone fashion without a bigger picture. As mentioned in the PR, `str_starts_with()` and `str_ends_with()` are obvious companion functions. And ultimately calling `strtolower()` on both parameters before passing them to `str_contains()` is quite explicit in what it does (and would also resolve the Unicode vs ASCII confusion that others expressed). Alternatively `stripos()` would also work. Best regards Tim Düsterhus