Result: DiscardedThe test labeled "strftime()" was the faster by 0.0099 seconds, (0.917% faster)
The strftime() test took 1.0718 seconds.
The date() test took 1.0818 seconds.
Each test case ran 20 random code order iterations consisting of 251,268 loops for a total of 5,025,360 runs.
- Line execution difference (0.000002) milliseconds.
- Avg difference (0.496) milliseconds per 251,268 loops.
- Total difference 9.92 milliseconds for 5,025,360 loops
The iteration variablity for Code 1 was (7.5573) milliseconds and Code 2 was (8.8030) milliseconds. The lower and the closer together there values are the more accurate the results are.
The first test, "date()", was:
for ($i = 0; $i < 100; $i++) $GLOBALS['dummy'] = date('Y-m-d \\a\\t H:i:s', $GLOBALS['t']);
The second test, "strftime()", was:
for ($i = 0; $i < 100; $i++) $GLOBALS['dummy'] = strftime('%Y-%m-%d at %H:%M:%S', $GLOBALS['t']);