1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00
Files
archived-php-src/ext/pcre/tests/bug73483.phpt
T
2020-02-03 22:52:20 +01:00

16 lines
380 B
PHP

--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"