php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #105 file() seems to adds space to end of lines
Submitted: 1998-02-25 20:34 UTC Modified: 1998-03-01 19:38 UTC
From: Espen dot Lyngaas at team17 dot com Assigned:
Status: Closed Package: Other
PHP Version: 3.0b4 OS: Linux RH5.0 2.0.32 i686
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
16 + 45 = ?
Subscribe to this entry?

 
 [1998-02-25 20:34 UTC] Espen dot Lyngaas at team17 dot com
<?
  $array = file("textfile.txt");
  echo "x"+$array[1]+"x";
?>

Produces:

xHello x
      ^a space here.

I'm *very* sure there is no space in the file. Code does
not add a space under PHP2.

(Sorry I haven't had time to install 3.0b5 yet to check 
if that produces the same result)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-03-01 19:38 UTC] zeev
works fine, possibly incompatible with PHP2 (includes
the newlines that are read from the file)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 13:01:30 2024 UTC