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
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 11 17:01:27 2024 UTC