summaryrefslogtreecommitdiff
path: root/ext/phar/tests/phar_test.inc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/phar/tests/phar_test.inc')
-rwxr-xr-xext/phar/tests/phar_test.inc64
1 files changed, 0 insertions, 64 deletions
diff --git a/ext/phar/tests/phar_test.inc b/ext/phar/tests/phar_test.inc
deleted file mode 100755
index 213e95558c..0000000000
--- a/ext/phar/tests/phar_test.inc
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-
-if (function_exists('date_default_timezone_set')) {
- date_default_timezone_set('UTC');
-}
-
-$manifest = '';
-$glags = 0;
-
-foreach($files as $name => $cont)
-{
- global $gflags, $files;
-
- $comp = NULL;
- $crc32= NULL;
- $clen = NULL;
- $ulen = NULL;
- $time = isset($ftime) ? $ftime : @mktime(12, 0, 0, 3, 1, 2006);
- $flags= 0;
- $perm = 0x000001B6;
- $meta = NULL;
-
- // overwrite if array
- if (is_array($cont))
- {
- foreach(array('comp','crc32','clen','ulen','time','flags','perm','meta','cont') as $what)
- {
- if (isset($cont[$what]))
- {
- $$what = $cont[$what];
- }
- }
- }
-
- // create if not yet done
- if (empty($comp)) $comp = $cont;
- if (empty($ulen)) $ulen = strlen($cont);
- if (empty($clen)) $clen = strlen($comp);
- if (empty($crc32))$crc32= crc32($cont);
- if (isset($meta)) $meta = serialize($meta);
-
- // write manifest entry
- $manifest .= pack('V', strlen($name)) . $name;
- $manifest .= pack('VVVVVV', $ulen, $time, $clen, $crc32, $flags|$perm, strlen($meta)) . $meta;
-
- // globals
- $gflags |= $flags;
- $files[$name] = $comp;
-}
-
-$alias = 'hio';
-
-if (isset($pmeta)) $pmeta = serialize($pmeta); else $pmeta = '';
-$manifest = pack('VnVV', count($files), 0x1000, $glags, strlen($alias)) . $alias . pack('V', strlen($pmeta)) . $pmeta . $manifest;
-$file .= pack('V', strlen($manifest)) . $manifest;
-
-foreach($files as $cont)
-{
- $file .= $cont;
-}
-
-file_put_contents($fname, $file);
-
-?> \ No newline at end of file