Annotation of embedaddon/php/ext/pcre/tests/bug41050.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #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: 
                     11: if (preg_match($regex,$sql, $m)) echo 'matched';
                     12: else echo 'not matched';
                     13: 
                     14: print_r($m);
                     15: 
                     16: ?>
                     17: --EXPECT--
                     18: matchedArray
                     19: (
                     20:     [0] => SELECT * FROM #__components
                     21:     [1] => SELECT
                     22:     [2] => 
                     23:     [3] => 
                     24:     [4] => 
                     25:     [5] => 
                     26: )

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>