1--TEST-- 2Bug #77428: mb_ereg_replace() doesn't replace a substitution variable 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// This behavior is broken, but kept for BC reasons 12var_dump(mb_ereg_replace('(%)', '\\\1', 'a%c')); 13// For clarity, the above line is equivalent to: 14var_dump(mb_ereg_replace('(%)', '\\\\1', 'a%c')); 15 16?> 17--EXPECT-- 18string(4) "a\%c" 19string(4) "a\%c" 20