php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #30796 String Write
Submitted: 2004-11-15 18:02 UTC Modified: 2004-11-15 18:46 UTC
From: bug@php.net Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4CVS-2004-11-15 (stable) OS: Linux
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: bug@php.net
New email:
PHP Version: OS:

 

 [2004-11-15 18:02 UTC] bug@php.net
Description:
------------
Please add a function that is directly able to add a char or word at a numeric place in a string.

Reproduce code:
---------------
// For example:

str_ins([inser string], [int position], [string haystack]);



// For use like this:

$longtext = 'This is a long text...';

$found = 7;

echo str_ins("_a", $found-2, $longtext);

Expected result:
----------------
This_a is a long text...

Actual result:
--------------
An error *lol*

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-15 18:46 UTC] derick@php.net
You can easily do this in userspace, and recoding this in C won't make it much faster.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 15:01:36 2025 UTC