1
0
mirror of https://github.com/php/php-src.git synced 2026-03-31 20:53:00 +02:00
Files
archived-php-src/ext/mbstring/tests/bug77428.phpt
Nikita Popov 76c687feaf Fixed bug #77428
mb_ereg_replace historically has not supported escaping backslashes
with backslashes. Go back to that behavior for BC reasons.
2019-01-08 10:21:01 +01:00

15 lines
345 B
PHP

--TEST--
Bug #77428: mb_ereg_replace() doesn't replace a substitution variable
--FILE--
<?php
// This behavior is broken, but kept for BC reasons
var_dump(mb_ereg_replace('(%)', '\\\1', 'a%c'));
// For clarify, the above line is equivalent to:
var_dump(mb_ereg_replace('(%)', '\\\\1', 'a%c'));
?>
--EXPECT--
string(4) "a\%c"
string(4) "a\%c"