|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65001 string argument length limits for preg_match() are not written in the man page
Submitted: 2013-06-09 22:58 UTC Modified: 2013-06-12 19:19 UTC
From: bakaburg1 at gmail dot com Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: 5.4.16 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-06-09 22:58 UTC] bakaburg1 at gmail dot com
From manual page:

I got crazy to understand why preg_match() in my script wasn't working than I 
realize that the problem could have been in the length of the string I was 
to it.

A little search and indeed there was a length limiti for the passed string.

Well I think it should be written pretty clearly in the function manual page, 
together with ways to circumvent the problem (increase the limit or 
substr[inging]). It would be quite useful, especially for newbies that could not 
be able to solve the problem by themselves easily.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-12 19:19 UTC]
-Status: Open +Status: Wont fix
 [2013-06-12 19:19 UTC]
There is a warning generated when the pattern size limit is hit. Given that, I 
don't think it's really worth documenting, particularly since libpcre doesn't 
have a hard and fast limit — it varies depending on how it's compiled, and 
boilerplate along the lines of "The maximum pattern length may be limited by the 
libpcre build configuration" seems useless.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 14:01:32 2024 UTC