php.net |  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 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: ekoisa at gmail dot com
New email:
PHP Version: OS:

 

 [2011-11-14 07:57 UTC] ekoisa at gmail dot com
Description:
------------
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 
039

test rtrim: 345030
3450

Actual result:
--------------
test ltrim: 05039 
39

test rtrim: 345030
345

Patches

Pull Requests

History

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

the sencode of the ?trim is a list. not a pattern.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC