note 127296 added to class.seekableiterator

From: Date: Mon, 18 Jul 2022 07:30:42 +0000
Subject: note 127296 added to class.seekableiterator
Groups: php.notes 
Request: Send a blank email to php-notes+get-219025@lists.php.net to get a copy of this message
Note: $offset parameter of SeekableIterator::seek() is position in list, not array key. <?php $iterator = new ArrayIterator([1 => "apple", 2 => "banana", 3 => "cherry"]); echo $iterator->offsetGet(2); // banana $iterator->seek(2); echo $iterator->current(); // cherry ?> ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.135 (proxied: 31.129.215.166) ---- Manual Page -- https://php.net/manual/en/class.seekableiterator.php Edit -- https://main.php.net/note/edit/127296 Del: integrated -- https://main.php.net/note/delete/127296/integrated Del: useless -- https://main.php.net/note/delete/127296/useless Del: bad code -- https://main.php.net/note/delete/127296/bad+code Del: spam -- https://main.php.net/note/delete/127296/spam Del: non-english -- https://main.php.net/note/delete/127296/non-english Del: in docs -- https://main.php.net/note/delete/127296/in+docs Del: other reasons-- https://main.php.net/note/delete/127296 Reject -- https://main.php.net/note/reject/127296 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#219025) next »