echo PHP_Archive::apiVersion();
?>
--EXPECT--
-0.7
\ No newline at end of file
+0.7.1
\ No newline at end of file
PHP_Archive::mapPhar(5, 5);
PHP_Archive::mapPhar(5, 'hio');
PHP_Archive::mapPhar(5, 'hio', 'hi');
-PHP_Archive::mapPhar(5, 'hio', true, 5, 5);
__HALT_COMPILER(); ?>
--EXPECTF--
-Warning: PHP_Archive::mapPhar() expects at least 3 parameters, 0 given in %s on line %d
+Warning: PHP_Archive::mapPhar() expects at least 2 parameters, 0 given in %s on line %d
-Warning: PHP_Archive::mapPhar() expects at least 3 parameters, 1 given in %s on line %d
-
-Warning: PHP_Archive::mapPhar() expects at least 3 parameters, 2 given in %s on line %d
-
-Warning: PHP_Archive::mapPhar() expects at least 3 parameters, 2 given in %s on line %d
+Warning: PHP_Archive::mapPhar() expects at least 2 parameters, 1 given in %s on line %d
Fatal error: PHP_Archive::mapPhar(): internal corruption of phar "%s" (truncated manifest) in %s on line %d
\ No newline at end of file
function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
register_shutdown_function('cleanup');
$file = "<?php
-PHP_Archive::mapPhar(5, 'hio', false);
+PHP_Archive::mapPhar('hio', false);
__HALT_COMPILER(); ?>";
$manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
$file .= pack('VV', strlen($manifest) + 4, 1) . $manifest . pack('VV', crc32('a'), 1) . 'a';
function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
register_shutdown_function('cleanup');
$file = "<?php
-PHP_Archive::mapPhar(5, 'hio', false);
+PHP_Archive::mapPhar('hio', false);
__HALT_COMPILER(); ?>";
// filesize should be 1, and is 2
$manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
register_shutdown_function('cleanup');
$file = "<?php
-PHP_Archive::mapPhar(5, 'hio', false);
+PHP_Archive::mapPhar('hio', false);
__HALT_COMPILER(); ?>";
// wrong crc32
$manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
register_shutdown_function('cleanup');
$file = "<?php
-PHP_Archive::mapPhar(5, 'hio', true);
+PHP_Archive::mapPhar('hio', true);
__HALT_COMPILER(); ?>";
$manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 11);
$file .= pack('VV', strlen($manifest) + 4, 1) . $manifest . pack('VV', crc32('a'), 1) . chr(75) . chr(4) . chr(0); // 'a' gzdeflated
function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
register_shutdown_function('cleanup');
$file = "<?php
-PHP_Archive::mapPhar(5, 'hio', true);
+PHP_Archive::mapPhar('hio', true);
__HALT_COMPILER(); ?>";
// file length is too short
$manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
register_shutdown_function('cleanup');
$file = "<?php
-PHP_Archive::mapPhar(5, 'hio', true);
+PHP_Archive::mapPhar('hio', true);
__HALT_COMPILER(); ?>";
// file length is too short
$manifest = pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
register_shutdown_function('cleanup');
$file = "<?php
-PHP_Archive::mapPhar(5, 'hio', true);
+PHP_Archive::mapPhar('hio', true);
__HALT_COMPILER(); ?>";
$manifest = '';
$manifest .= pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
register_shutdown_function('cleanup');
$file = "<?php
-PHP_Archive::mapPhar(5, 'hio', true);
+PHP_Archive::mapPhar('hio', true);
__HALT_COMPILER(); ?>";
$manifest = '';
$manifest .= pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
register_shutdown_function('cleanup');
$file = "<?php
-PHP_Archive::mapPhar(5, 'hio', false);
+PHP_Archive::mapPhar('hio', false);
__HALT_COMPILER(); ?>";
$manifest = '';
$manifest .= pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
--EXPECTF--
array(26) {
[0]=>
- int(0)
+ int(12)
[1]=>
- int(0)
+ int(2090329158)
[2]=>
int(33060)
[3]=>
[12]=>
int(-1)
["dev"]=>
- int(0)
+ int(12)
["ino"]=>
- int(0)
+ int(2090329158)
["mode"]=>
int(33060)
["nlink"]=>
}
array(26) {
[0]=>
- int(0)
+ int(12)
[1]=>
- int(0)
+ int(2090329108)
[2]=>
int(16676)
[3]=>
[12]=>
int(-1)
["dev"]=>
- int(0)
+ int(12)
["ino"]=>
- int(0)
+ int(2090329108)
["mode"]=>
int(16676)
["nlink"]=>
function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
register_shutdown_function('cleanup');
$file = "<?php
-PHP_Archive::mapPhar(5, 'hio', false);
+PHP_Archive::mapPhar('hio', false);
__HALT_COMPILER(); ?>";
$manifest = '';
$manifest .= pack('V', 1) . 'a' . pack('VVVV', 1, time(), 0, 9);
--EXPECTF--
array(26) {
[0]=>
- int(0)
+ int(12)
[1]=>
- int(0)
+ int(2090329158)
[2]=>
int(33060)
[3]=>
[12]=>
int(-1)
["dev"]=>
- int(0)
+ int(12)
["ino"]=>
- int(0)
+ int(2090329158)
["mode"]=>
int(33060)
["nlink"]=>
function cleanup() { unlink(dirname(__FILE__) . '/008_phar.php'); }
register_shutdown_function('cleanup');
$file = "<?php
-PHP_Archive::mapPhar(5, 'hio', false);
+PHP_Archive::mapPhar('hio', false);
__HALT_COMPILER(); ?>";
$contents = 'abcdefg';
$manifest = pack('V', 1) . 'a' . pack('VVVV', strlen($contents), time(), 0, 8 + strlen($contents));