1--TEST--
2Test finfo_close() function : basic functionality
3--SKIPIF--
4<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
5--FILE--
6<?php
7/* Prototype  : resource finfo_close(resource finfo)
8 * Description: Close fileinfo resource.
9 * Source code: ext/fileinfo/fileinfo.c
10 * Alias to functions:
11 */
12
13echo "*** Testing finfo_close() : basic functionality ***\n";
14
15$magicFile = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'magic';
16
17$finfo = finfo_open( FILEINFO_MIME, $magicFile );
18var_dump( $finfo );
19
20// Calling finfo_close() with all possible arguments
21var_dump( finfo_close($finfo) );
22
23$finfo = new finfo( FILEINFO_MIME, $magicFile );
24var_dump( $finfo );
25unset( $finfo );
26
27?>
28===DONE===
29--EXPECTF--
30*** Testing finfo_close() : basic functionality ***
31resource(%d) of type (file_info)
32bool(true)
33object(finfo)#%d (%d) {
34}
35===DONE===
36