Result: DiscardedThe test labeled "literal" was the faster by 0.031 seconds, (2.951% faster)
The literal test took 1.0205 seconds.
The chr() test took 1.0515 seconds.
Each test case ran 20 random code order iterations consisting of 290,062 loops for a total of 5,801,240 runs.
- Line execution difference (0.000005) milliseconds.
- Avg difference (1.552) milliseconds per 290,062 loops.
- Total difference 31.03 milliseconds for 5,801,240 loops
The iteration variablity for Code 1 was (3.8281) milliseconds and Code 2 was (0.7392) milliseconds. The lower and the closer together there values are the more accurate the results are.
The first test, "chr()", was:
$GLOBALS['dummy'] = chr(65);
The second test, "literal", was:
$GLOBALS['dummy'] = 'A';