summaryrefslogtreecommitdiff
path: root/test/benchmark/run.php
diff options
context:
space:
mode:
Diffstat (limited to 'test/benchmark/run.php')
-rw-r--r--test/benchmark/run.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/benchmark/run.php b/test/benchmark/run.php
index bee7c2d..2ca1907 100644
--- a/test/benchmark/run.php
+++ b/test/benchmark/run.php
@@ -1,6 +1,6 @@
<?php
-require __DIR__ . "/../../vendor/autoload.php";
+require __DIR__ . '/../../vendor/autoload.php';
$iterations = isset($argv[1]) ? $argv[1] : 100;
@@ -9,21 +9,21 @@ $content = file_get_contents(__DIR__ . '/example.html');
$dom = $html5->loadHTML($content);
$samples = array();
-for ($i = 0; $i < $iterations; $i++) {
+for ($i = 0; $i < $iterations; ++$i) {
$t = microtime(true);
$dom = $html5->loadHTML($content);
$samples[] = microtime(true) - $t;
}
$time = array_sum($samples) / count($samples);
-echo "Loading: " . ($time * 1000) . "\n";
+echo 'Loading: ' . ($time * 1000) . "\n";
$samples = array();
-for ($i = 0; $i < $iterations; $i++) {
+for ($i = 0; $i < $iterations; ++$i) {
$t = microtime(true);
$html5->saveHTML($dom);
$samples[] = microtime(true) - $t;
}
$time = array_sum($samples) / count($samples);
-echo "Writing: " . ($time * 1000) . "\n";
+echo 'Writing: ' . ($time * 1000) . "\n";
exit(0);