php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #13352 trim/rtrim/ltrim do not work as advertised
Submitted: 2001-09-17 16:02 UTC Modified: 2001-09-17 17:27 UTC
From: kevin dot way at overtone dot org Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 4.0.6 OS: Linux
Private report: No CVE-ID: None
 [2001-09-17 16:02 UTC] kevin dot way at overtone dot org
<?php
echo rtrim('foo bar ', ' ');
?>

if you specify a character class as the second argument (like the documentation states is legal), you get returned nothing at all.  a quick look at string.c seems to indicate no evidence of this ever working, is the code wrong, or the documentation?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-17 16:24 UTC] mfischer@php.net
Verified to work with latest CVS. 4.0.6 had no support for second paramter so I might guess your version number is wrong in the report. Please also test with CVS.

- Markus
 [2001-09-17 16:24 UTC] rasmus@php.net
The documentation states:

Note: The second parameter was added in PHP 4.0.7 

 [2001-09-17 17:27 UTC] jeroen@php.net
Bogusfied. By the way, I moved the note a bit more to the top (and that's an understatement). Change will appear soon on www.php.net (there seem to be some manual-generation problems, so really don't know when...)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 11:01:28 2024 UTC