Bug #55640 [Fbk->NoF]: Functionality of 'from' and 'len' as arrays is not implemented
Edit report at https://bugs.php.net/bug.php?id=55640&edit=1
ID: 55640
Updated by: php-bugs@lists.php.net
Reported by: dmitry dot sychov at gmail dot com
Summary: Functionality of 'from' and 'len' as arrays is not
implemented
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: *General Issues
PHP Version: 5.3.8
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2011-12-12 15:35:39] send_no_hormel at hotmail dot com
I agree that it'd be very nice if one could pass a buffer as the input string, with arrays of
offsets, lengths, and replacement strings (which is something I need to accomplish), but per the
documentation, use of arrays for the replacement, offset, and lengths are only valid if the input
string itself is passed as an array, and in that case, this function will return an array, not a
string.
This is best categorized as a desired functionality, but it's not a bug.
------------------------------------------------------------------------
[2011-10-10 14:45:49] rintaun at projectxero dot net
Example:
<?php
echo substr_replace('abcde', 'f', array(0, 1), array(1, 1));
?>
Expected output:
ffcde
Actual output:
Warning: substr_replace(): Functionality of 'from' and 'len' as
arrays is not implemented in - on line 2
abcde
------------------------------------------------------------------------
[2011-09-13 22:17:07] kalle@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2011-09-08 10:54:13] dmitry dot sychov at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.substr-replace%23Changelog
---
I'am getting: "Functionality of 'from' and 'len' as arrays is not
implemented"
when trying to pass arrays as per documentation.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55640&edit=1
Thread (5 messages)