php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54252 Implement countLines() method for SplFileObject
Submitted: 2011-03-14 23:20 UTC Modified: -
From: proofek at gmail dot com Assigned:
Status: Open Package: SPL related
PHP Version: Irrelevant OS: n/a
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: proofek at gmail dot com
New email:
PHP Version: OS:

 

 [2011-03-14 23:20 UTC] proofek at gmail dot com
Description:
------------
It'd be nice to have native support for counting lines in SplFileObject. At the 
moment I have to go through the file line by line to count the lines. It's a real 
pain.

Also see the discussion in the internal mailing list:  http://marc.info/?l=php-
internals&m=129988577428035&w=2

I have attached a patch containing both countLines() method implementation and 
phpt tests.  


Patches

SplFileObject_countLines (last revision 2011-03-14 22:21 UTC) by proofek at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC