php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1649 ltrim() behaves much like trim()
Submitted: 1999-07-02 05:47 UTC Modified: 1999-07-02 13:37 UTC
From: pallas at kadan dot cz Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.11 OS: RedHat Linux 6.0, Kernel 2.2.10,
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pallas at kadan dot cz
New email:
PHP Version: OS:

 

 [1999-07-02 05:47 UTC] pallas at kadan dot cz
After switching from PHP 3.0.7 to PHP 3.0.11 I found out that ltrim() behaves much like
trim() e.g. it strips newlines (maybe whitespace as well) from the _end_ of the supplied string 
as well. I put up a test script at http://uf.kadan.cz/~pallas/ltrimtest.php3 and its source at
http://uf.kadan.cz/~pallas/ltrimtest.phps. The script produces the same result in browser, but
if you look at the page source, you can clearly see, that the newlines have been stripped where 
ltrim() was applied. For more information about PHP environment, I've put up a phpinfo() at
http://uf.kadan.cz/~pallas/info.php3. I hope it's enough information provided.

I configured PHP using the following configuration line:

configure \
  --with-zlib \
  --with-gd \
  --with-gdbm \
  --with-pgsql=/opt/postgres \
  --with-shared-apache=../apache_1.3.6 \
  --with-exec-dir=/home/httpd/CGI \
  --enable-track-vars=yes

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-02 13:37 UTC] sas at cvs dot php dot net
Thanks for paying attention. Fixed in CVS
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 11:01:34 2025 UTC