Bug #81437 [Opn]: mb_strtchr cutting differently on php 8.1

From: Date: Tue, 14 Sep 2021 13:45:11 +0000
Subject: Bug #81437 [Opn]: mb_strtchr cutting differently on php 8.1
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236595@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81437&edit=1

 ID:                 81437
 Updated by:         nicolasgrekas@php.net
 Reported by:        nicolasgrekas@php.net
 Summary:            mb_strtchr cutting differently on php 8.1
 Status:             Open
 Type:               Bug
 Package:            *General Issues
 PHP Version:        8.1.0RC1
 Block user comment: N
 Private report:     N

 New Comment:

It could return false, but that's not the historical behavior apparently :)


Previous Comments:
------------------------------------------------------------------------
[2021-09-14 13:34:47] cmb@php.net

Shouldn't that return false, since neither haystack not needle are
ASCII encoded?

------------------------------------------------------------------------
[2021-09-14 13:22:47] nicolasgrekas@php.net

Description:
------------
echo mb_strrchr('déjàdéjà', 'é', false, 'ASCII');

echoes "à" on 8.1 but echoes "éjà" on previous versions.

See https://3v4l.org/jujrP



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=81437&edit=1


Thread (6 messages)

« previous php.bugs (#236595) next »