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