php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54519 substr_replace array options not documented
Submitted: 2011-04-13 08:00 UTC Modified: 2011-04-19 09:22 UTC
From: stas@php.net Assigned: aharvey (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: stas@php.net
New email:
PHP Version: OS:

 

 [2011-04-13 08:00 UTC] stas@php.net
Description:
------------
substr_replace accepts arguments not only as strings but as arrays, and judging from SVN it is there for many years, but the manual says nothing about this option. 

Test script:
---------------
var_dump(substr_replace(array("foo","bar"),array("baz","blah"),array(1,2)));

Actual result:
--------------
array(2) {
  [0]=>
  string(4) "fbaz"
  [1]=>
  string(6) "bablah"
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-19 08:57 UTC] aharvey@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey
 [2011-04-19 09:22 UTC] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=310346
Log: Fix doc bug #54519 (substr_replace array options not documented) by providing
some minimal documentation of the array parameter options available.
 [2011-04-19 09:22 UTC] aharvey@php.net
-Status: Assigned +Status: Closed
 [2011-04-19 09:22 UTC] aharvey@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.

Added to the manual, although I'm (very) sure there's room for improvement.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 18:00:02 2026 UTC