Result: DiscardedThe test labeled "str_replace/strtolower" was the faster by 0.0776 seconds, (6.143% faster)
The str_replace/strtolower test took 1.186 seconds.
The str_ireplace test took 1.2637 seconds.
Each test case ran 20 random code order iterations consisting of 295,685 loops for a total of 5,913,700 runs.
- Line execution difference (0.000013) milliseconds.
- Avg difference (3.881) milliseconds per 295,685 loops.
- Total difference 77.63 milliseconds for 5,913,700 loops
The iteration variablity for Code 1 was (13.1366) milliseconds and Code 2 was (8.6963) 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']));