![]() |
VOOZH | about |
The SplFileObject::rewind() function is an inbuilt function of Standard PHP Library (SPL) in PHP which is used to Rewind the file to the first line.
Syntax:
void SplFileObject::rewind( $line_num)
Parameters: This function does not accept any parameter.
Return values: This function does not return any value.
Below Programs illustrate the SplFileObject::rewind() function in PHP:
Program-1:
Output:
<?php
Program-2:
GeeksforGeeks gfg contribute
Reference: https://www.php.net/manual/en/splfileobject.rewind.php