1--TEST-- 2finfo_file(): Testing file names 3--SKIPIF-- 4<?php require_once(__DIR__ . '/skipif.inc'); ?> 5--FILE-- 6<?php 7 8$fp = finfo_open(); 9try { 10 var_dump(finfo_file($fp, "\0")); 11} catch (\TypeError $e) { 12 echo $e->getMessage() . \PHP_EOL; 13} 14try { 15 var_dump(finfo_file($fp, '')); 16} catch (\ValueError $e) { 17 echo $e->getMessage() . \PHP_EOL; 18} 19try { 20 var_dump(finfo_file($fp, NULL)); 21} catch (\ValueError $e) { 22 echo $e->getMessage() . \PHP_EOL; 23} 24var_dump(finfo_file($fp, '.')); 25var_dump(finfo_file($fp, '&')); 26 27?> 28--EXPECTF-- 29finfo_file(): Argument #1 ($finfo) must not contain any null bytes 30finfo_file(): Argument #1 ($finfo) cannot be empty 31finfo_file(): Argument #1 ($finfo) cannot be empty 32string(9) "directory" 33 34Warning: finfo_file(&): Failed to open stream: No such file or directory in %s on line %d 35bool(false) 36