ftell

It returns the current position of the file pointer

Example

<?php

$fp = fopen(“test.txt”, “r”);

$data = fgets($fp, 5);

echo ftell($fp);

?>

Output

4