xref: /PHP-7.0/ext/pcre/tests/bug40909.phpt (revision a2e06e6d)
1--TEST--
2Bug #40909 (pcre 7.0 regression)
3--FILE--
4<?php
5
6$pattern =
7"/\s([\w_\.\/]+)(?:=([\'\"]?(?:[\w\d\s\?=\(\)\.,'_#\/\\:;&-]|(?:\\\\\"|\\\')?)+[\'\"]?))?/";
8$context = "<simpletag an_attribute=\"simpleValueInside\">";
9
10$match = array();
11
12if ($result =preg_match_all($pattern, $context, $match))
13{
14
15var_dump($result);
16var_dump($match);
17}
18
19?>
20--EXPECT--
21int(1)
22array(3) {
23  [0]=>
24  array(1) {
25    [0]=>
26    string(33) " an_attribute="simpleValueInside""
27  }
28  [1]=>
29  array(1) {
30    [0]=>
31    string(12) "an_attribute"
32  }
33  [2]=>
34  array(1) {
35    [0]=>
36    string(19) ""simpleValueInside""
37  }
38}
39