mirror of
https://github.com/php/php-src.git
synced 2026-03-31 20:53:00 +02:00
mb_ereg_replace historically has not supported escaping backslashes with backslashes. Go back to that behavior for BC reasons.
15 lines
345 B
PHP
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"
|