#32312 [Opn->Fbk]: Error in PCRE
| From: | sniper@php.net | Date: | Fri, 18 Mar 2005 23:07:35 +0000 |
| Subject: | #32312 [Opn->Fbk]: Error in PCRE | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-75498@lists.php.net to get a copy of this message | ||
ID: 32312
Updated by: sniper@php.net
Reported By: xanthor at xanthor dot tk
-Status: Open
+Status: Feedback
Bug Type: PCRE related
Operating System: GNU/Linux
PHP Version: 4.3.10
New Comment:
No, it doesn't return 'bool(true)' as preg_match() returns an integer.
Try with something like 'var_dump(preg_match...'
Also RTFM.
Previous Comments:
------------------------------------------------------------------------
[2005-03-18 22:50:07] xanthor at xanthor dot tk
As I just said before, it returns true...
------------------------------------------------------------------------
[2005-03-17 10:02:00] sniper@php.net
What DOES it return with PHP 4.3.2 ?
------------------------------------------------------------------------
[2005-03-16 21:31:52] xanthor at xanthor dot tk
It works with 4.3.2
------------------------------------------------------------------------
[2005-03-16 00:47:24] sniper@php.net
And with what PHP version does this work with?
------------------------------------------------------------------------
[2005-03-15 10:32:34] xanthor at xanthor dot tk
Description:
------------
The following code returns a wrong result with some strings, but when
we reduce them, it swich back to expected behaviour.
Tested on PHP 4.3.10, 4.3.9, 5.0.2, and 5.0.3RC2
PCRE Library Version => 4.5 01-December-2003
Reproduce code:
---------------
preg_match("/((.*<.*>.*)*.(.*<.+>.+<.>.+)*b)?/",'<><'.str_repeat('a',14).'>'.str_repeat('a',33).'<a>'.str_repeat('a',92).'<a>'.str_repeat('a',8).'<a>a')
Expected result:
----------------
This code should return true
Actual result:
--------------
The code returns false.
Reduce one of the str_repeat, and it'll return true.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32312&edit=1