php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78122 preg_split returns false since PHP 7.3.5 instead of array
Submitted: 2019-06-06 15:19 UTC Modified: 2019-06-06 15:29 UTC
From: nicolas dot grekas+php at gmail dot com Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 7.3.6 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nicolas dot grekas+php at gmail dot com
New email:
PHP Version: OS:

 

 [2019-06-06 15:19 UTC] nicolas dot grekas+php at gmail dot com
Description:
------------
On 7.3.5 and 7.3.6

Test script:
---------------
var_export(preg_split('//iu', chr(226).'foo'));

Expected result:
----------------
    array (
      0 => '�foo',
    )

Actual result:
--------------
    false

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-06-06 15:29 UTC] nikic@php.net
-Status: Open +Status: Not a bug
 [2019-06-06 15:29 UTC] nikic@php.net
This is an intentional change due to bug #76127. preg_split() was silently ignoring errors, contrary to the documented contract and all other preg_* functions.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 16:01:30 2024 UTC