Result: DiscardedThe test labeled "commas" was the faster by 0.0268 seconds, (4.523% faster)
The commas test took 0.565 seconds.
The interpolation test took 0.5918 seconds.
Each test case ran 20 random code order iterations consisting of 148,641 loops for a total of 2,972,820 runs.
- Line execution difference (0.000009) milliseconds.
- Avg difference (1.338) milliseconds per 148,641 loops.
- Total difference 26.77 milliseconds for 2,972,820 loops
The iteration variablity for Code 1 was (3.0959) milliseconds and Code 2 was (4.3955) milliseconds. The lower and the closer together there values are the more accurate the results are.
The first test, "commas", was:
echo $GLOBALS['x'], ' test ', $GLOBALS['y'], $GLOBALS['z'], ' test ';
The second test, "interpolation", was:
echo "$GLOBALS[x] test $GLOBALS[y]$GLOBALS[z] test ";