xref: /PHP-8.0/ext/phar/tests/files/phar_oo_test.inc (revision f8d79582)
1<?php
2
3ini_set('date.timezone', 'GMT');
4
5$tname = basename(current(get_included_files()), ".php");
6$fname = dirname(__FILE__) . "/$tname.phar.php";
7$pname = 'phar://' . $fname;
8$file = (binary)'<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>';
9
10$files = array();
11
12if (!isset($pharconfig)) $pharconfig = 0;
13
14switch($pharconfig)
15{
16    default:
17    case 0:
18        $files['a.php']   = '<?php echo "This is a.php\n"; ?>';
19        $files['b.php']   = '<?php echo "This is b.php\n"; ?>';
20        $files['b/c.php'] = '<?php echo "This is b/c.php\n"; ?>';
21        $files['b/d.php'] = '<?php echo "This is b/d.php\n"; ?>';
22        $files['e.php']   = '<?php echo "This is e.php\n"; ?>';
23        break;
24    case 1:
25        $files['a.csv'] =<<<EOF
261,2,3
272,a,b
283,"c","'e'"
29EOF;
30        break;
31    case 2:
32        $files['a.csv'] =<<<EOF
331,2,3
342,a,b
353,"c","'e'"
364
375,5
38
397,777
40EOF;
41        break;
42    case 3:
43        $files['a.php'] = '<?php echo new new class;';
44        break;
45}
46
47$ftime = mktime(12, 0, 0, 3, 1, 2006);
48include 'phar_test.inc';
49
50?>
51