PHP Benchmarks

Performance comparison of PHP code alternatives.

Test: include vs. include_once

No Description

View test history (1) Run this test again Return to test menu

Result: Discarded

The test labeled "include_once" was the faster by 0.0447 seconds, (7.221% faster)

include_once 100%
include 92.779%

The include_once test took 0.5745 seconds.
The include test took 0.6192 seconds.


Each test case ran 20 random code order iterations consisting of 140,277 loops for a total of 2,805,540 runs.

  • Line execution difference (0.000016) milliseconds.
  • Avg difference (2.236) milliseconds per 140,277 loops.
  • Total difference 44.72 milliseconds for 2,805,540 loops

The iteration variablity for Code 1 was (3.2637) milliseconds and Code 2 was (1.9234) 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 (