|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-09-12 22:09 UTC] kevinpeno at gmail dot com
[2009-09-12 22:17 UTC] kevinpeno at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 00:00:02 2025 UTC |
Description: ------------ Whenever you use the $append[] method, offsetGet in object implementing ArrayAccess. Reproduce code: --------------- <?php class MyArrayObject extends ArrayObject { function offsetSet( $k, $v ) { //Will Print OffsetSet: \n NULL \n NULL - var_dump( 'offsetSet:', $k, $value ); } } $test = new MyArrayObject(); $test[] = 'test'; ?> Expected result: ---------------- Arguments in offsetGet should return the new offset key and the value properly. Actual result: -------------- $k and $v in the example above var_dump to NULL