PHP Benchmarks

Performance comparison of PHP code alternatives.

Test: include vs. include_once

No Description

Run this test again Return to test menu

Result: Discarded

The test labeled "include_once" was the faster by 0.0702 seconds, (5.874% faster)

include_once 100%
include 94.126%

The include_once test took 1.1242 seconds.
The include test took 1.1944 seconds.


Each test case ran 20 random code order iterations consisting of 286,594 loops for a total of 5,731,880 runs.

  • Line execution difference (0.000012) milliseconds.
  • Avg difference (3.508) milliseconds per 286,594 loops.
  • Total difference 70.16 milliseconds for 5,731,880 loops

The iteration variablity for Code 1 was (14.2624) milliseconds and Code 2 was (7.6658) milliseconds. The lower and the closer together there values are the more accurate the results are.


The first test, "include", was:


The second test, "include_once", was:


Running: Linux (x86_64:1 GB) PHP (