Using splFileObject and its iterator