note 106775 added to arrayiterator.offsetset
| From: | shiranai7 at NOSPAM dot hotmail dot NOSPAM dot com | Date: | Mon, 05 Dec 2011 20:52:51 +0000 |
| Subject: | note 106775 added to arrayiterator.offsetset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184919@lists.php.net to get a copy of this message | ||
The $index argument seems to be NULL for append operations, e.g.:
<?php
// example extension class
class Test extends ArrayIterator
{
public function offsetSet($index, $newval)
{
echo 'Test::offsetSet('.var_export($index, true).',
'.var_export($newval, true).")\n";
}
}
// test
$i = new Test;
$i[] = 'append a value';
?>
The result is:
Test::offsetSet(NULL, 'append a value')
----
Server IP: 89.187.142.233
Probable Submitter: 90.180.251.47
----
Manual Page -- http://www.php.net/manual/en/arrayiterator.offsetset.php
Edit -- https://master.php.net/note/edit/106775
Del: integrated -- https://master.php.net/note/delete/106775/integrated
Del: useless -- https://master.php.net/note/delete/106775/useless
Del: bad code -- https://master.php.net/note/delete/106775/bad+code
Del: spam -- https://master.php.net/note/delete/106775/spam
Del: non-english -- https://master.php.net/note/delete/106775/non-english
Del: in docs -- https://master.php.net/note/delete/106775/in+docs
Del: other reasons-- https://master.php.net/note/delete/106775
Reject -- https://master.php.net/note/reject/106775
Search -- https://master.php.net/manage/user-notes.php