mirror of
https://github.com/php/php-src.git
synced 2024-10-19 15:34:25 +00:00
27 lines
431 B
Plaintext
27 lines
431 B
Plaintext
|
--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] =>
|
||
|
)
|