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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Espen dot Lyngaas at team17 dot com
New email:
PHP Version: OS:

 

 [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-2022 The PHP Group
All rights reserved.
Last updated: Tue Nov 29 14:04:16 2022 UTC