1--TEST--
2finfo_file(): Files and directories inside an stream
3--SKIPIF--
4<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
5<?php if (!extension_loaded('zip')) { die("skip zip extension not loaded"); } ?>
6--FILE--
7<?php
8
9$fp = finfo_open(FILEINFO_MIME_TYPE);
10$results = array();
11
12$zip = __DIR__ . "/resources/dir.zip";
13$stream = "zip://" . __DIR__ . "/resources/dir.zip";
14$dir = $stream . "#dir/";
15$png = $stream . "#dir/test.png";
16
17var_dump(
18         finfo_file($fp, $zip),
19         finfo_file($fp, $dir),
20         finfo_file($fp, $png)
21);
22?>
23--EXPECT--
24string(15) "application/zip"
25string(9) "directory"
26string(9) "image/png"
27