xref: /php-src/ext/pcre/tests/gh16184.phpt (revision c4bb0755)
1--TEST--
2GH-16184 (UBSan address overflowed in ext/pcre/php_pcre.c)
3--CREDITS--
4YuanchengJiang
5--FILE--
6<?php
7
8$string = 'This is a string. It contains numbers (0*9) as well as parentheses and some other things!';
9echo preg_replace(array('/\b\w{1}s/', '/(\d{1})*(\d{1})/', '/[\(!\)]/'), array('test', '$1 to $2', '*'), $string), "\n";
10
11?>
12--EXPECT--
13This test a string. It contains numbers * to 0* to 9* test well test parentheses and some other things*
14