Update str_replace.js

php quote: "If search is an array and replace is a string, then this replacement string is used for every value of search."
This mod converts replace to an Array of search.length
Update str_replace.js
Merge pull request #154 from glenara/patch-1

Update str_replace.js
Update str_replace.js

The formula used to get the count value is incorrect.
The correct count is obtained by appending the matches found when calling split minus 1
(split.length -1).
Update str_ireplace.js

After reading docs on formatting I decided to re-submit this replacement for str_ireplace().
This is a complete rewrite with all new code based on str_replace().
(str_replace() being a clean and efficient PHP 5.0 compliant substitute)

This proposed replacement is PHP 5.0 Compliant.

Original code does not allow for arrays, does not include optional 'count' and uses regex expressions which are unnecessary and waste of resources.
With all due respect to the original author.

Sorry for the re-submission but I thought you would like it re-submitted properly.
Glen
Fixes issue #151

We had here _getType and type variables leaking to global scope, thus recursive calls to serialize were overwriting the type variable.
Update str_replace.js
Update str_ireplace.js
Update str_replace.js
Update str_ireplace.js
Merge pull request #156 from glenara/patch-5

Update str_replace.js
Merge pull request #157 from glenara/patch-6

Update str_ireplace.js
"for each" fix, for modified prototypes

Fix "for..each" in case Array or Object prototypes are modified globally.
more improvement for changed Object.prototype

more improvement for globally changed Object.prototype.
real_opt is the real option in the tmp_arr object, otherwiese it could be globally set prototype property.
Merge pull request #161 from yadimon/patch-2

"for each" fix, for modified prototypes
Merge remote-tracking branch 'main/master'