Historical ResultsBased on (4) saved test runs, The test labeled "str_replace/strtolower" was (on average) the faster by 0.006 seconds, (0.654% faster)
The str_replace/strtolower test took 0.9046 seconds.
The str_ireplace test took 0.9106 seconds.
Each test case ran 20 random code order iterations consisting of 205,269 loops for a total of 4,105,370 runs.
- Line execution difference (0.000001) milliseconds.
- Avg difference (0.000) milliseconds per 205,269 loops.
- Total difference 5.96 milliseconds for 4,105,370 loops
The iteration variablity for Code 1 was (0.0000) milliseconds and Code 2 was (0.0000) milliseconds. The lower and the closer together there values are the more accurate the results are.
The first test, "str_ireplace", was:
str_ireplace('sTrIng', 'STRING!', $GLOBALS['dummy']);
The second test, "str_replace/strtolower", was:
str_replace('string', 'STRING!', strtolower($GLOBALS['dummy']));