php.net |  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
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ddrplayer at foxmail dot com
New email:
PHP Version: OS:

 

 [2008-09-12 04:03 UTC] ddrplayer at foxmail dot com
Description:
------------
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:
---------------
<?php
$stringendingtag='<ending>';
$s='hello world <abc><ending>';
echo trim($s,'<ending>');
?>

Expected result:
----------------
hello world <abc>


Actual result:
--------------
hello world <abc

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-12 10:42 UTC] felipe@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 second argument expects a char list.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Oct 02 09:05:52 2022 UTC