xref: /PHP-8.3/ext/phar/tests/zip/largezip.phpt (revision 74859783)
1--TEST--
2Phar: large zip file (zip edge cases)
3--EXTENSIONS--
4phar
5--INI--
6phar.require_hash=0
7phar.readonly=0
8--FILE--
9<?php
10$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
11$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php';
12$pname = 'phar://' . $fname;
13$pname2 = 'phar://' . $fname2;
14
15$p = new Phar($fname);
16$p['big'] = str_repeat(str_repeat('hi', 100), 1000);
17$p['big2'] = str_repeat(str_repeat('hi', 100), 1000);
18
19copy($fname, $fname2);
20$p2 = new Phar($fname2);
21var_dump(strlen($p2['big']->getContent()));
22?>
23--CLEAN--
24<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?>
25<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); ?>
26--EXPECT--
27int(200000)
28