Result: SavedThe test labeled "commas" was the faster by 0.0324 seconds, (3.156% faster)
The commas test took 0.9943 seconds.
The interpolation test took 1.0267 seconds.
Each test case ran 20 random code order iterations consisting of 276,897 loops for a total of 5,537,940 runs.
- Line execution difference (0.000006) milliseconds.
- Avg difference (1.620) milliseconds per 276,897 loops.
- Total difference 32.41 milliseconds for 5,537,940 loops
The iteration variablity for Code 1 was (0.5810) milliseconds and Code 2 was (0.5371) 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 ";