|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46061 trim could not work as expected
Submitted: 2008-09-12 04:03 UTC Modified: 2008-09-12 10:42 UTC
From: ddrplayer at foxmail dot com Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 5.2CVS-2008-09-12 (snap) OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
46 - 8 = ?
Subscribe to this entry?

 [2008-09-12 04:03 UTC] ddrplayer at foxmail dot com
hi ,
first of all
sorry for my bad english

but trim could not work as expected
i run the program in 5.14,5.25 ,it could not work as expected.

Reproduce code:
$s='hello world <abc><ending>';
echo trim($s,'<ending>');

Expected result:
hello world <abc>

Actual result:
hello world <abc


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-12 10:42 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 second argument expects a char list.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Dec 07 14:01:28 2023 UTC