Replaces all array elements matching the predicate with the given replacement. For your convenience the given replacement value is also passed to the predicate as a second parameter, so you can easily compare the two if needed.
the original replaced elements
Replaces all array elements matching the predicate with the given replacement. For your convenience the given replacement value is also passed to the predicate as a second parameter, so you can easily compare the two if needed.