Result: SavedThe test labeled "!defined()" was the faster by 0.0044 seconds, (0.404% faster)
The !defined() test took 1.0765 seconds.
The @define() test took 1.0809 seconds.
Each test case ran 20 random code order iterations consisting of 161,989 loops for a total of 3,239,780 runs.
- Line execution difference (0.000001) milliseconds.
- Avg difference (0.218) milliseconds per 161,989 loops.
- Total difference 4.36 milliseconds for 3,239,780 loops
The iteration variablity for Code 1 was (16.5334) milliseconds and Code 2 was (16.4431) milliseconds. The lower and the closer together there values are the more accurate the results are.
The first test, "@define()", was:
The second test, "!defined()", was:
if (!defined('CONSTANT')) define('CONSTANT', $GLOBALS['dummy']);