Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122764 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 1A0BF1A009C for ; Tue, 26 Mar 2024 21:14:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1711487704; bh=6aDwvUpKuZwa9OPpUHOkqqSPjLpKxDszxTy+pOPCj8M=; h=In-Reply-To:References:Date:From:To:Subject:From; b=dvGsOsqpXKlcQ9OWOOcc2EO2JjSQ3h7KBdGN18UjeLTBY/7oOfLtaXkhFnRZ3WSMX SKKwfPP1ekFmLRndkPxnaEkwsilbDzK9UHok8t5fVSD4z6x2EEuqBZK3cOOcG1VoI+ NEkrvX3jtI7qZ1V2ZktBSP+3ZePXKJ9piU4YeHwo6tvXAKJ+r1BsU2zugGk2TlAtNJ 1VwKWpuX4i6R0r5MObNfKRNpMiEUb6BaB9KX+iMvnxoM+meUC8UcGhWFnz7v2VPas0 YD/O/y/7SqtetjC7Ira6J/2Fi/chmGQX27eNniUZavZprqxRNFdlPvdfc/Mq+8X8aF TBaUK7dEN6WHw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0D94B180663 for ; Tue, 26 Mar 2024 21:15: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=3.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (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, 26 Mar 2024 21:15:02 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id A3DE632009FF for ; Tue, 26 Mar 2024 17:14:36 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute3.internal (MEProxy); Tue, 26 Mar 2024 17:14:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1711487676; x=1711574076; bh=Wx9g25DeWzNZghnzBAzKVK8+xz+r TAERTIpHehF31MQ=; b=BjZHy5zMpqD0gwzDqSqK/JcjgJgvBV5aVvnk+iqdxxEM +a5q8emCTyK207O84OOLpSTwaaLcRK5T8u58ITuHpivMQ/r/rr3qRbLnejpoXp5i 1UR3AvnjHlxrpVGJr9I7Qj4FI2ME+u5mbhmalY3YwN8qB0Kr6T6G1FMD47ypdGNY /gck58DBS7/kkGEeQ/eq+Ep6p1ttuO8fdLhrROFZ95mrnTWTrm0OvaIfQGKUhavi 2+4m+Fl1aKMLVLI+U02hkStKLoTTGAl1dGN+1iF3qovUvxH8TE53HYQQth0VDP+l OyKCLzA68P7fh8IgsjrfVjmgA4BzyId7FJw3x9YMIg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddufedgudegjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesrg dtreerreertdenucfhrhhomhepfdevrghsphgvrhcunfgrnhhgvghmvghijhgvrhdfuceo lhgrnhhgvghmvghijhgvrhesphhhphdrnhgvtheqnecuggftrfgrthhtvghrnhepgfelhf dtueektdetfeeuvdetvdektdevfeevleevieehgfdvhfehtedvffeitefhnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrnhhgvghmvghijh gvrhesphhhphdrnhgvth X-ME-Proxy: Feedback-ID: id4f946ef:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id A6A581700093; Tue, 26 Mar 2024 17:14:35 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-328-gc998c829b7-fm-20240325.002-gc998c829 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: <216d4a09-7921-48f6-b892-8d9605d367ab@app.fastmail.com> In-Reply-To: References: <141e31f3-b7cf-4bd1-9bac-c9ec078767ed@app.fastmail.com> Date: Tue, 26 Mar 2024 22:14:11 +0100 To: internals@lists.php.net Subject: Re: [PHP-DEV][RFC] grapheme cluster for str_split, grapheme_str_split function Content-Type: multipart/alternative; boundary=ef6e2acbf5db4596891af3f953de3b09 From: langemeijer@php.net ("Casper Langemeijer") --ef6e2acbf5db4596891af3f953de3b09 Content-Type: text/plain On Tue, Mar 26, 2024, at 18:15, Derick Rethans wrote: > Many of these already exist, such as grapheme_substr. We can't simply change the behaviour of the already existing functions due to BC reasons. Wow. I feel very stupid. I feel I should have known about grapheme_*, but I didn't. Oh my, the manual says since PHP 5.3 no less. From what I've seen around being used, I'm far from the only one though. In an attempt to justify my own stupidity I searched its use and it's bad. Searching on github with language:PHP: `mb_strlen` 84k files, `grapheme_strlen` 680 Then a big number of first 100 of these files are stubs/polyfills/phpstan metadata. I've seen no framework except Symphony (but they might be further in the searchresults) > The grapheme_str_split function, as well as other intl extension functions is what should replace mbstring really. YES! I'm sorry to have wasted your time. If you need someone to help for the grapheme_ marketing team, let me know. --ef6e2acbf5db4596891af3f953de3b09 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
On Tue, Mar 26,= 2024, at 18:15, Derick Rethans wrote:
Many of these already exist, such as graphem= e_substr. We can't simply change the behaviour of the already existing f= unctions due to BC reasons. 

<= div>Wow. I feel very stupid. I feel I should have known about grapheme_*= , but I didn't. Oh my, the manual says since PHP 5.3 no less. From what = I've seen around being used, I'm far from the only one though. In an att= empt to justify my own stupidity I searched its use and it's bad.

Searching on github with language:PHP:
`mb_strlen`  84k files, `grapheme_strlen` 680

Then a big number of first 100 of these files are = stubs/polyfills/phpstan metadata. I've seen no framework except Symphony= (but they might be further in the searchresults)

The grapheme_str_s= plit function, as well as other intl extension functions is what should = replace mbstring really. 

YES!

I'm sorry to have wasted your time. I= f you need someone to help for the grapheme_ marketing team, let me know= .
--ef6e2acbf5db4596891af3f953de3b09--