mirror of
https://github.com/php/php-src.git
synced 2024-10-19 15:34:25 +00:00
27 lines
452 B
Plaintext
27 lines
452 B
Plaintext
|
--TEST--
|
||
|
Get Comment
|
||
|
--SKIPIF--
|
||
|
<?php
|
||
|
/* $Id$ */
|
||
|
if(!extension_loaded('zip')) die('skip');
|
||
|
?>
|
||
|
--FILE--
|
||
|
<?php
|
||
|
$dirname = dirname(__FILE__) . '/';
|
||
|
$file = $dirname . 'test_with_comment.zip';
|
||
|
include $dirname . 'utils.inc';
|
||
|
$zip = new ZipArchive;
|
||
|
if (!$zip->open($file)) {
|
||
|
exit('failed');
|
||
|
}
|
||
|
$idx = $zip->locateName('foo');
|
||
|
echo $zip->getCommentName('foo') . "\n";
|
||
|
echo $zip->getCommentIndex($idx);
|
||
|
|
||
|
$zip->close();
|
||
|
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
foo comment
|
||
|
foo comment
|