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