Memory leak with preg_replace
- by Silvio Donnini
I'm using the preg_replace function to replace accents in a string, I'm working with UTF-8.
I have incurred in what seems to be a memory leak, but I can't isolate the root cause, my code is rather simple:
preg_replace(
array_keys($aToNoAccents),
array_values($aToNoAccents),
$sText
);
where $aToNoAccents is an…