1--TEST-- 2Test stream_get_meta_data() function : error conditions 3--FILE-- 4<?php 5echo "*** Testing stream_get_meta_data() : error conditions ***\n"; 6 7echo "\n-- Testing stream_get_meta_data() function with closed stream resource --\n"; 8$fp = fopen(__FILE__, 'r'); 9fclose($fp); 10try { 11 var_dump(stream_get_meta_data($fp)); 12} catch (TypeError $e) { 13 echo $e->getMessage(), "\n"; 14} 15 16echo "Done"; 17?> 18--EXPECT-- 19*** Testing stream_get_meta_data() : error conditions *** 20 21-- Testing stream_get_meta_data() function with closed stream resource -- 22stream_get_meta_data(): supplied resource is not a valid stream resource 23Done 24