1--TEST-- 2Bug #79188: Memory corruption in preg_replace/preg_replace_callback and unicode 3--FILE-- 4<?php 5 6var_dump(preg_replace("//u", "", "a" . str_repeat("\u{1f612}", 10))); 7var_dump(preg_replace_callback( 8 "//u", function() { return ""; }, "a" . str_repeat("\u{1f612}", 10))); 9 10?> 11--EXPECT-- 12string(41) "a" 13string(41) "a" 14