php.net |  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
 [2013-06-09 22:58 UTC] bakaburg1 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.preg-match#refsect1-function.preg-
match-parameters
---

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 
passing 
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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-12 19:19 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 [2013-06-12 19:19 UTC] aharvey@php.net
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: Thu Dec 26 14:01:30 2024 UTC