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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 14:01:31 2024 UTC