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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

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: Sat Dec 21 15:01:29 2024 UTC