|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2013-09-01 11:49 UTC] requinix@php.net
 
-Status:           Open
+Status:           Verified
-Operating System: Windows
+Operating System: *
  [2013-09-01 11:49 UTC] requinix@php.net
  [2013-09-08 13:12 UTC] felipe@php.net
 
-Status:      Verified
+Status:      Assigned
-Assigned To:
+Assigned To: colder
  [2014-02-27 03:44 UTC] levim@php.net
  [2017-10-24 07:25 UTC] kalle@php.net
 
-Status:      Assigned
+Status:      Open
-Assigned To: colder
+Assigned To:
 | |||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 11:00:01 2025 UTC | 
Description: ------------ PHP document says that SplFileObject->valid() checks if a file pointer is not at EOF, just like SplFileObject->eof(). But since SplFileObject implements Iterator, valid() should not return false while the current element is valid. Test script: --------------- $f = new SplFileObject('php://memory', 'r+'); assert('$f instanceof Iterator'); $f->fwrite("line 1"); $f->rewind(); assert('$f->valid() === true'); assert('$f->eof() === false'); assert('$f->current() === "line 1"'); assert('$f->valid() === true'); // fails assert('$f->eof() === true');