xref: /PHP-8.0/ext/pcre/tests/bug41050.phpt (revision 17db5db7)
1--TEST--
2Bug #41050 (pcre 7.0 regression)
3--FILE--
4<?php
5// by legolas558
6
7$regex = '/(insert|drop|create|select|delete|update)([^;\']*('."('[^']*')+".')?)*(;|$)/i';
8
9$sql = 'SELECT * FROM #__components';
10
11if (preg_match($regex,$sql, $m)) echo 'matched';
12else echo 'not matched';
13
14print_r($m);
15
16?>
17--EXPECT--
18matchedArray
19(
20    [0] => SELECT * FROM #__components
21    [1] => SELECT
22    [2] =>
23    [3] =>
24    [4] =>
25    [5] =>
26)
27