xref: /PHP-7.4/ext/mbstring/tests/bug77514.phpt (revision 263c5878)
1--TEST--
2Bug #77514: mb_ereg_replace() with trailing backslash adds null byte
3--SKIPIF--
4<?php
5if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
6if (!function_exists('mb_ereg_replace')) die('skip mb_ereg_replace() not available');
7?>
8--FILE--
9<?php
10
11$a="abc123";
12var_dump(mb_ereg_replace("123","def\\",$a));
13
14?>
15--EXPECT--
16string(7) "abcdef\"
17