ba101d357852d61a739ad3f0f4ff9be4a74c787e
[yaffs-website] / vendor / symfony / http-foundation / Tests / Fixtures / response-functional / common.inc
1 <?php
2
3 use Symfony\Component\HttpFoundation\Response;
4
5 $parent = __DIR__;
6 while (!@file_exists($parent.'/vendor/autoload.php')) {
7     if (!@file_exists($parent)) {
8         // open_basedir restriction in effect
9         break;
10     }
11     if ($parent === dirname($parent)) {
12         echo "vendor/autoload.php not found\n";
13         exit(1);
14     }
15
16     $parent = dirname($parent);
17 }
18
19 require $parent.'/vendor/autoload.php';
20
21 error_reporting(-1);
22 ini_set('html_errors', 0);
23 ini_set('display_errors', 1);
24
25 header_remove('X-Powered-By');
26 header('Content-Type: text/plain; charset=utf-8');
27
28 register_shutdown_function(function () {
29     echo "\n";
30     session_write_close();
31     print_r(headers_list());
32     echo "shutdown\n";
33 });
34 ob_start();
35
36 $r = new Response();
37 $r->headers->set('Date', 'Sat, 12 Nov 1955 20:04:00 GMT');
38
39 return $r;