SplFileObject::key
SplFileObject::key
(PHP 5 >= 5.1.0, PHP 7)
SplFileObject::key — Get line number
Description
public int SplFileObject::key ( void )
Gets the current line number.
Note:
This number may not reflect the actual line number in the file if SplFileObject::setMaxLineLen() is used to read fixed lengths of the file.