mirror of
https://github.com/php/php-src.git
synced 2025-01-09 12:34:14 +08:00
20 lines
480 B
PHP
20 lines
480 B
PHP
--TEST--
|
|
Phar: PHP bug #46178: "memory leak in ext/phar"
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
|
--INI--
|
|
phar.require_hash=0
|
|
phar.readonly=0
|
|
--FILE--
|
|
<?php
|
|
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
|
|
|
|
$phar = new Phar($fname);
|
|
$phar['long/path/name.txt'] = 'hi';
|
|
$phar->addEmptyDir('long/path');
|
|
?>
|
|
===DONE===
|
|
--CLEAN--
|
|
<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');?>
|
|
--EXPECT--
|
|
===DONE===
|