Bug->Doc #79594 [Opn->Ver]: Uncaught TypeError: preg_split() expects parameter 3 to be int, null given

From: Date: Wed, 13 May 2020 15:13:48 +0000
Subject: Bug->Doc #79594 [Opn->Ver]: Uncaught TypeError: preg_split() expects parameter 3 to be int, null given
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17571@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79594&edit=1

 ID:                 79594
 Updated by:         cmb@php.net
 Reported by:        vedad at kajtaz dot net
 Summary:            Uncaught TypeError: preg_split() expects parameter 3
                     to be int, null given
-Status:             Open
+Status:             Verified
-Type:               Bug
+Type:               Documentation Problem
-Package:            Documentation problem
+Package:            PCRE related
 Operating System:   FreeBSD
 PHP Version:        7.4.5
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2020-05-13 15:06:33] 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



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



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


Thread (4 messages)

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