I'm parsing bbcode in a news application I'm building so my staff can easily add markup without knowing any HTML. In my testing I'm running into an issue where if the content inside a quote tag is too long (not sure of the exact byte length of the string but its only a few paragraphs, nothing extreme) the function doesn't output anything. I'm not seeing any errors, just a blank space where the parsed content should be.
If the flag is Usi and the string is long it works properly, if the flag is Usi and the string is short it blows up. The reverse is true for si.
Here's the snippet in question.
$search = array(
$replace = array(
$str = preg_replace($search , $replace, $string);