1--TEST-- 2Bug #57547 Settings options on file doesn't give same result as constructor options 3--SKIPIF-- 4<?php 5if (!class_exists('finfo')) 6 die('skip no fileinfo extension'); 7--FILE-- 8<?php 9 10$filenames = array("..", __FILE__); 11 12foreach ($filenames as $filename) { 13 $finfo = new finfo(FILEINFO_MIME); 14 var_dump($finfo->file($filename)); 15 16 $finfo2 = new finfo(); 17 var_dump($finfo2->file($filename, FILEINFO_MIME)); 18} 19 20?> 21--EXPECT-- 22string(9) "directory" 23string(9) "directory" 24string(28) "text/x-php; charset=us-ascii" 25string(28) "text/x-php; charset=us-ascii" 26