Correct:
is_readable()
Explanation:
Answer option C is correct.
The is_readable()
function can be used to check whether or not a given file is readable. If the given file is readable, the is_readable() function returns true; otherwise it returns false.
Answer option B is incorrect. The touch()
function is used to change the access and modification time of a given file. If the file asked does not exist, it will create a new blank file. The syntax of the touch command is as follows:
bool touch (string $filename [, int $time = time() [, int $atime ]])
where $filename is the name of the file, $time is the touch time, $atime is the access time of the given filename.
Answer option A is incorrect. The stat() function is used to retrieve the statistics of a given file. It shows various information including device number, inode number, inode protection mode, number of links, userid of the owner, groupid of the owner, size in bytes, time of last access, time of last modification, time of last inode change, blocksize of filesystem IO, number of 512-byte blocks allocated, etc.
Answer option D is incorrect. The fseek() function is used to move the file pointer from its current position to a new position, forward or backward, specified by the number of bytes. The syntax of the fseek() function is as follows:
int fseek ( resource $handle , int $offset [, int $whence ] )
where $handle is the file pointer, $offset is the position to move, and whence parameter is used to set the cursor relative to offset.
Reference: https://www.php.net/manual/en/function.stat.php