php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67526 Insufficient documentation
Submitted: 2014-06-26 19:34 UTC Modified: 2015-03-26 11:28 UTC
From: finkel at sd-il dot com Assigned: salathe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: finkel at sd-il dot com
New email:
PHP Version: OS:

 

 [2014-06-26 19:34 UTC] finkel at sd-il dot com
Description:
------------
---
From manual page: http://www.php.net/function.array-splice
---

" length

    If length is omitted, removes everything from offset to the end of the array. If length is specified and is positive, then that many elements will be removed. If length is specified and is negative then the end of the removed portion will be that many elements from the end of the array. Tip: to remove everything from offset to the end of the array when replacement is also specified, use count($input) for length."

But what is length = 0?  The documentation does not specify.




Patches

doc-bug-67526.patch (last revision 2015-03-25 22:20 UTC by patrick dot schwisow at gmail dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-03-25 22:22 UTC] patrick dot schwisow at gmail dot com
If 0 is passed, nothing is removed. Added a patch that makes this explicit.
 [2015-03-26 11:28 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=336201
Log: Mention what happens when length=0 for array_splice() (doc bug #67526 Patch by Patrick Schwisow)
 [2015-03-26 11:28 UTC] salathe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: salathe
 [2015-03-26 11:28 UTC] salathe@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: Thu Oct 08 06:00:01 2026 UTC