1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<?php
ini_set('date.timezone', 'GMT');
$fname = dirname(__FILE__) . '/phar_oo_test.phar.php';
$pname = 'phar://' . $fname;
$file = (binary)'<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>';
$files = array();
if (!isset($pharconfig)) $pharconfig = 0;
switch($pharconfig)
{
default:
case 0:
$files['a.php'] = '<?php echo "This is a.php\n"; ?>';
$files['b.php'] = '<?php echo "This is b.php\n"; ?>';
$files['b/c.php'] = '<?php echo "This is b/c.php\n"; ?>';
$files['b/d.php'] = '<?php echo "This is b/d.php\n"; ?>';
$files['e.php'] = '<?php echo "This is e.php\n"; ?>';
break;
case 1:
$files['a.csv'] =<<<EOF
1,2,3
2,a,b
3,"c","'e'"
EOF;
break;
case 2:
$files['a.csv'] =<<<EOF
1,2,3
2,a,b
3,"c","'e'"
4
5,5
7,777
EOF;
break;
case 3:
$files['a.php'] = '<?php echo new new class;';
break;
}
$ftime = mktime(12, 0, 0, 3, 1, 2006);
include 'phar_test.inc';
?>
|