Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94807 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72276 invoked from network); 2 Aug 2016 22:53:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Aug 2016 22:53:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.51 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.51 mail-wm0-f51.google.com Received: from [74.125.82.51] ([74.125.82.51:36925] helo=mail-wm0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/E0-00814-F5421A75 for ; Tue, 02 Aug 2016 18:53:19 -0400 Received: by mail-wm0-f51.google.com with SMTP id i5so310853247wmg.0 for ; Tue, 02 Aug 2016 15:53:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=AS6YyBe6FyASufHaieFm3vMTO2Bk6btsz+DqZ6NayOc=; b=OEHP5t4KM1sbByFBec8oyRcEfhtwYRyeX+7q1wWqBCLqSWoxdzKKAl4M8qS+Orwo2r TBzr0Sb6XomrhjpSeh2PRMBOp/0+7FN2N+RmV7w7TBAU0i7LUoxNOCOahHluUbwtBeqh HoiX7t1bv4RuIjXfBxwURe6i6nBt/A25AqwPYUmVc5pmqoIh9AUOAd9Htfr/ZBxXgFH1 bv8Bo9aNru3ZtBv9DUH0SZnl0nhcyGCUcMOMypsPmuOOTArRTBvRHefB+sE6b5lNeUqi g9itzF5ldQqI2sqPXLgpneQwwSwn+bf/ZD/FOW9O+0Hl0seg6h0xMly409bEwkepYoig 8P/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=AS6YyBe6FyASufHaieFm3vMTO2Bk6btsz+DqZ6NayOc=; b=EoeNPm6/Db2bt3jOyHdz8zHjVptQDIMHXQV5T3sPbK1PVY309cyFgKggFMx4BEbdqz iG2VW8zD4e6/hRn/Zly9mU1Qx4QqAuUZSWJ+jrGkk0E8SjAxg9d20S0RR6qiyr0Sf5mb 4a+uuFjX/aG+NR/CRNSX0BHDFwUzofDr4OwWGduJ/JK+C59fCM5gnnVz2DUqUcXJNXZO SvnlsQogwHuq6TuQS66i2IO1Ja2ESkEhbsSUaGAu6y0T/amNoKve9Yu2lanJP8DZW1VI HaOijYp35hL1kb6A7jzzCK3DQ1Fq5TibbiPtajjlX8KAEmRTTNdH78sNfkUKaehUpYzl FqPw== X-Gm-Message-State: AEkoouvNme7FsM+134b5EOOTXOo5m3i1wyFkNdo6up/k44B+EysVud9eSNs8oa5RV7vgSQ== X-Received: by 10.194.187.7 with SMTP id fo7mr58357778wjc.162.1470178394855; Tue, 02 Aug 2016 15:53:14 -0700 (PDT) Received: from [192.168.1.5] ([95.148.161.240]) by smtp.googlemail.com with ESMTPSA id d64sm5011646wmc.22.2016.08.02.15.53.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Aug 2016 15:53:14 -0700 (PDT) To: internals@lists.php.net References: <8442f1fa5544b2ca03e7cebbc64e8e5c@wkhudgins.info> Message-ID: Date: Tue, 2 Aug 2016 23:53:08 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions From: rowan.collins@gmail.com (Rowan Collins) On 02/08/2016 23:44, Yasuo Ohgaki wrote: > It might be okay to have "s" in function names, but if we want to be > consistent, > > str_replace -> str_replaces > str_ireplace -> str_ireplaces > > IMO, following names are better for consistency. > > str_begin > str_ibegin > str_end > str_iend I think those names mean something different: "str_begin" sounds like an imperative "make this string begin with X"; "str_begins" is more of an assertion "the string begins with X". Ruby would spell it with a ? at the end. It's also the same form, grammatically, as the common "isFoo". Note that this logic holds for "str_replace", which *is* an imperative - you are not saying "tell me if X replaces Y", you are saying "please replace X with Y". Regards, -- Rowan Collins [IMSoP]