summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/bug73483.phpt
blob: cbf4a2bdafc2dd860459c365a750223b880a8457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--TEST--
Bug #73483 (Segmentation fault on pcre_replace_callback)
--FILE--
<?php
$regex = "#dummy#";
setlocale(LC_ALL, "C");
var_dump(preg_replace_callback($regex, function (array $matches) use($regex) {
    setlocale(LC_ALL, "en_US");
    $ret = preg_replace($regex, "okey", $matches[0]);
    setlocale(LC_ALL, "C");
    return $ret;
}, "dummy"));
?>
--EXPECT--
string(4) "okey"