Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106192 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 39621 invoked from network); 9 Jul 2019 11:36:06 -0000 Received: from unknown (HELO mail-ed1-f53.google.com) (209.85.208.53) by pb1.pair.com with SMTP; 9 Jul 2019 11:36:06 -0000 Received: by mail-ed1-f53.google.com with SMTP id w20so17013486edd.2 for ; Tue, 09 Jul 2019 01:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=+VdumocuOirBcvT82zwLYmWAYYYMwSPlQENe558FMww=; b=EGH/yD1N96Z61xsYRuA5HHtLQjCaAZ+JIdM7Un2XiucUAC8IQuWgmcovQVTLIrId0f +clYvpWzZlX9AH9p09F4+8k60PTMohC+niz+P2HtGJ+FnTVYVtaBkpLDu0hifs9S/a8i xBYCuUugjs9gCYtNSlC+FVBFsQO+r7KDAVYtq7T8/pnmQ4aF+aDdVNsCUbHZqf7orVa4 3ZaXaXAmiEfkfkm5Kl+3Gv8V8qwwuSq1nPnC6YZmIoa78HbXu9tp0A9rkcehjslL3Ffh 8ppnDGd3a2J3je+9asR83OEE/rsVGhb/gTLVZgTFPewgqU17Yf5NkjC9kGFkjH907l0B rMfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=+VdumocuOirBcvT82zwLYmWAYYYMwSPlQENe558FMww=; b=Blm3IAuuaGtjUJF63zbD+WRyOZd+HrJIUPqpw7vvBnwLGT9yVf8nSki1M/rHphZl7E imzwxNdlydz3Ar9TtbPuQTUOGVXCCB9Ac9059jnrtztCXSLp6I+CireJf2p5KC2c+fE+ fZnhxX9NuU1GZ/3KyrYxSQ9EuuQFqJS6c7aVtG9aFHN9EceH37rQttnQ73rOqVbP0qN6 DSCIPblsejYs50zy+yfKWWeNet1d4hRAGDxpDYDhPlBGuP4umPMoodjyAGUcmXOnFIMg gvgIvdZ02pcRN/GZpyyLve5siupe3ajEmRzmiUC+NK2mGwqZIdXUqwaOr+qZJJPS6SUs uwKA== X-Gm-Message-State: APjAAAXxdMrXH5eYr7+nvh0bqF6GD/kCZYByNqekgwa0oETfARMIUj8Z uKh/WOrDz+EwHBNtFyoHFZU= X-Google-Smtp-Source: APXvYqzGURysHxaX9JQk8Tr7C6orDkuN5DWeppKPgWHNtf3J6Sw416myKpqdYfGAxJucT70n1tSxkQ== X-Received: by 2002:a50:e718:: with SMTP id a24mr24233629edn.91.1562662542201; Tue, 09 Jul 2019 01:55:42 -0700 (PDT) Received: from [192.168.0.63] (84-75-30-51.dclient.hispeed.ch. [84.75.30.51]) by smtp.gmail.com with ESMTPSA id a1sm3899313edq.29.2019.07.09.01.55.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jul 2019 01:55:41 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) In-Reply-To: Date: Tue, 9 Jul 2019 10:55:40 +0200 Cc: =?utf-8?Q?Bj=C3=B6rn_Larsson?= , Theodore Brown , Will Hudgins , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <8442f1fa5544b2ca03e7cebbc64e8e5c@wkhudgins.info> <683c5da474e13283030cac3d0c0ec080@wkhudgins.info> <2c37999d1e5372ae6ab48bfce5420796@wkhudgins.info> <2CF672F8-12F5-4D37-8B8C-591A6E695220@benramsey.com> <78034520cdb610d923e25d47ed718938@wkhudgins.info> <000a01d52e91$2a4b6f20$7ee24d60$@jhdxr.com> <93528f103c149b7c48e8f35914049d06@wkhudgins.info> <97884add-88fd-e09e-92c6-2c1b68c579f5@xs4all.nl> <22ac19ecaf897370facfe9fd0a8b1993@wkhudgins.info> <0f8ab2d1-c308-7168-0aba-a5bcf327c3ad@telia.com> <4d340e64db8d81f47cd7e4f7d3a4c268@wkhudgins.info> <660880c5-6273-1f6d-2181-3cb4c67fb508@telia.com> To: Peter Bowyer X-Mailer: Apple Mail (2.3445.104.11) Subject: Re: [PHP-DEV] [VOTE] Voting opens for str_starts_with and ends_with functions From: claude.pache@gmail.com (Claude Pache) > Le 9 juil. 2019 =C3=A0 09:40, Peter Bowyer = a =C3=A9crit : >=20 > On Mon, 8 Jul 2019 at 19:09, Bj=C3=B6rn Larsson = > wrote: >=20 >> Having this _ci postfix is a new way of indicating case = insensitivity. >> I think that it might add to negative votes. Personally I think it's = a >> good idea to mimic existing ways, even if they are a bit awkward. >>=20 >> How about using a flag or following "tradition", like = stri_starts_with >> & stri_ends_with or str_istarts_with & str_iends_with? That would >> follow strstr / stristr and str_replace / str_ireplace. >>=20 >=20 > I would vote yes with that naming. It's a damn silly tradition, but = it's > what PHP uses for other functions, and keeping consistency is better = than > improving individual functions. >=20 > Peter There are currently (at least) two ways for marking case insensitivity = in the name: the character =E2=80=9Ci=E2=80=9D as in stripos() and the = substring =E2=80=9Ccase=E2=80=9D as in: strcasecmp(). Adding a third way, namely the =E2=80=9Cci=E2=80=9D suffix (or, even = worse, a flag) is absolutely in the silly tradition of inconsistent = naming of PHP functions (although admittedly not one we should strive to = maintain)... except that =E2=80=9Cci=E2=80=9D is maybe more meaningful = than =E2=80=9Ci=E2=80=9D and =E2=80=9Ccase=E2=80=9D. =E2=80=94Claude=