str_replace counts fail to accumulate with arrays
The $count parameter of str_replace is supposed to return the total
number of string replacements performed. This was only working correctly
when both $search and $subject were strings. When either or both are
arrays, the counts need to accumulate across all replacements. The code,
as written, was only returning the replacement count for the last pair
of values.
Closes #1383
Reviewed By: @ptarjan
Differential Revision:
D1106935
Pulled By: @scannell