ID:               36153
 Updated by:       [EMAIL PROTECTED]
 Reported By:      a dot steponavicius at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         *Regular Expressions
 Operating System: Windows XP
 PHP Version:      4.4.2
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2006-01-25 10:04:06] a dot steponavicius at gmail dot com

Description:
------------
preg_match returns errors while parsing some correct expressions, o
dies with apache if there is more such "errors"...

The same behaviour is both in 4.4.2 and 5.1.2

Reproduce code:
---------------
$expressions = array(
1 => '/^ (?: . ){0,6} $/ix',
2 => '/^ (?: . ){0, 6} $/ix',
3 => '/^ (?: . ) {0, 6} $/ix',
4 => '/^ (?: . ) {0,6} $/ix',
);

foreach ($expressions as $key => $exp) {
    echo $key, ": ";
    var_dump(preg_match($exp, '2', $pat));
    var_dump($pat);
    echo "\n";
}


Expected result:
----------------
1: int(1)
array(1) {
  [0]=>
  string(1) "2"
}

2: int(1)
array(1) {
  [0]=>
  string(1) "2"
}

3: int(1)
array(1) {
  [0]=>
  string(1) "2"
}

4: int(1)
array(1) {
  [0]=>
  string(1) "2"
}


Actual result:
--------------
1: int(1)
array(1) {
  [0]=>
  string(1) "2"
}

2: int(0)
array(0) {
}

3: int(0)
array(0) {
}

4: Warning: preg_match(): Compilation failed: internal error: code
overflow at offs
et 17 in D:\Inetpub\Projects\.php5\testrx.php on line 12
bool(false)
array(0) {
}
... or sometimes there is no 4: ... and apache dies...


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


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

Reply via email to