|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-09-15 12:13 UTC] joseph_a at mail dot ru
When using ereg_replace() with a numeric 2nd argument (replacement string), this argument is treated as an empty string.
ereg_replace('4', 3, '124') produces '12' instead of '123'.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 06:00:01 2025 UTC |
But preg_replace('/4/', 3, '124') will produce '123' as expected. Even if it's not a bug, it still would be nice if that number would be autoconverted to string.