php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79594 Uncaught TypeError: preg_split() expects parameter 3 to be int, null given
Submitted: 2020-05-13 15:06 UTC Modified: 2020-05-13 15:21 UTC
From: vedad at kajtaz dot net Assigned: cmb (profile)
Status: Closed Package: PCRE related
PHP Version: 7.4.5 OS: FreeBSD
Private report: No CVE-ID: None
 [2020-05-13 15:06 UTC] vedad at kajtaz dot net
Description:
------------
The preg_split documentation:

https://www.php.net/manual/en/function.preg-split.php

states:

> A limit of -1 or 0 means "no limit" and, as is standard across PHP, you can use NULL to skip to the flags parameter.

However, passing null with strict_type throws a \TypeError:

Uncaught TypeError: preg_split() expects parameter 3 to be int, null given


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-13 15:13 UTC] cmb@php.net
-Status: Open +Status: Verified -Type: Bug +Type: Documentation Problem -Package: Documentation problem +Package: PCRE related
 [2020-05-13 15:21 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-05-13 15:21 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2020-05-13 15:22 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=b7ca52647b4b9e55079959d9202f58faaf3aea0b
Log: Fix #79594: Uncaught TypeError: preg_split() expects parameter 3 to be int, null given
 [2020-05-13 18:00 UTC] phpdocbot@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=a0a6e555d2848727822bcc3dea2b29b077eb42ea
Log: Fix #79594: Uncaught TypeError: preg_split() expects parameter 3 to be int, null given
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Aug 06 02:01:24 2020 UTC