|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60291 Ltrim and Rtrim string contain number bug
Submitted: 2011-11-14 07:57 UTC Modified: 2011-11-14 08:28 UTC
From: ekoisa at gmail dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.3.8 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: ekoisa at gmail dot com
New email:
PHP Version: OS:


 [2011-11-14 07:57 UTC] ekoisa at gmail dot com
strip string result for string contain numeric value not true;

this below code show it.

Test script:
echo "<br/>test ltrim: 05039 <br/>";
echo ltrim("05039", "05");

echo "<br/>test rtrim: 345030 <br/>";
echo rtrim("345030", "30");

Expected result:
test ltrim: 05039 

test rtrim: 345030

Actual result:
test ltrim: 05039 

test rtrim: 345030


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-14 08:28 UTC]
-Status: Open +Status: Bogus
 [2011-11-14 08:28 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

the sencode of the ?trim is a list. not a pattern.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jan 27 10:01:24 2021 UTC