Bug->Doc #80738 [Opn->Ver]: mb_stipos function

From: Date: Fri, 12 Feb 2021 14:02:50 +0000
Subject: Bug->Doc #80738 [Opn->Ver]: mb_stipos function
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18536@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80738&edit=1

 ID:                 80738
 Updated by:         cmb@php.net
 Reported by:        mikele890 at gmail dot com
 Summary:            mb_stipos function
-Status:             Open
+Status:             Verified
-Type:               Bug
+Type:               Documentation Problem
-Package:            Unknown/Other Function
+Package:            mbstring related
 Operating System:   Linux
 PHP Version:        8.0.2
 Block user comment: N
 Private report:     N

 New Comment:

This is only documented in the migration guide[1] so far:

| The needle argument for mb_strpos(), mb_strrpos(), mb_stripos(),
| mb_strripos(), mb_strstr(), mb_stristr(), mb_strrchr() and
| mb_strrichr() can now be empty.

[1] <https://www.php.net/manual/en/migration80.incompatible.php>


Previous Comments:
------------------------------------------------------------------------
[2021-02-12 13:50:25] mikele890 at gmail dot com

Description:
------------
php < 8:
  var_dump(false === mb_stripos('123456789', ''));
Result:
  <br />
  <b>Warning</b>:  mb_stripos(): Empty delimiter in <b>[...][...]</b> on
line    <b>4</b><br />
  bool(true)

php 8:
  var_dump(false === mb_stripos('123456789', ''));
Result:
  bool(false)

In versions lesser than 8 it will throw a warning but return true, which is totally opposite to
version 8 result




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



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


Thread (7 messages)

« previous php.doc.bugs (#18536) next »