summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/bug41050.phpt
blob: ff58e111ff034d8827788a0c8c79c8b4880b0b9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--TEST--
Bug #41050 (pcre 7.0 regression)
--FILE--
<?php
// by legolas558

$regex = '/(insert|drop|create|select|delete|update)([^;\']*('."('[^']*')+".')?)*(;|$)/i';

$sql = 'SELECT * FROM #__components';

if (preg_match($regex,$sql, $m)) echo 'matched';
else echo 'not matched';

print_r($m);

?>
--EXPECT--
matchedArray
(
    [0] => SELECT * FROM #__components
    [1] => SELECT
    [2] => 
    [3] => 
    [4] => 
    [5] => 
)