Skip to content

Commit 96d0fa6

Browse files
committed
Fix some warnings
1 parent 1c82de0 commit 96d0fa6

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

phalcon-1.3/public/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
echo $e->getMessage();
3131
}
3232

33-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
33+
require __DIR__ . '/../../libs/output_data.php';

phalcon-2.0/public/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
echo $e->getMessage();
3131
}
3232

33-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
33+
require __DIR__ . '/../../libs/output_data.php';

slim-3.0/index.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@
55
$app = new \Slim\App();
66

77
$app->get('/hello/index', function ($request, $response, $args) {
8-
return $response->write('Hello World!');
8+
return $response->write('Hello World!' . str_repeat('+', 22));
99
});
1010

11+
ob_start();
1112
$app->run();
13+
$output = ob_get_clean();
1214

13-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
15+
ob_start();
16+
// Doesn't work due to Content-Length header
17+
require __DIR__ . '/../libs/output_data.php';
18+
$benchmarkData = ob_get_clean();
19+
20+
echo str_replace('+', ' ', str_replace(str_repeat('+', min(22, strlen($benchmarkData))), $benchmarkData, $output));

symfony-3.4/web/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@
2929
$response->send();
3030
$kernel->terminate($request, $response);
3131

32-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
32+
require __DIR__ . '/../../libs/output_data.php';

0 commit comments

Comments
 (0)