php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #50211 (ArrayAccess::offsetSet) $object[] works too
Submitted: 2009-11-18 00:16 UTC Modified: 2009-11-23 20:58 UTC
From: uramihsayibok at gmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2009-11-18 00:16 UTC] uramihsayibok at gmail dot com
Description:
------------
The documentation for ArrayAccess::offsetSet should mention that $offset will be null when the array offset isn't given, as in with

$object = new Class_Implementing_ArrayAccess();
$object[] = $value;


Yes, this is a partial duplicate of bug 49807. It was closed by marking $offset as "mixed" but an explicit note on how (and when) $offset could be null would be nice - it's special behavior.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-23 20:57 UTC] svn@php.net
Automatic comment from SVN on behalf of bjori
Revision: http://svn.php.net/viewvc/?view=revision&revision=291226
Log: Fix bug#50211 (ArrayAccess::offsetSet) $object[] works too)
 [2009-11-23 20:58 UTC] bjori@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Jun 14 21:00:02 2026 UTC