|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23422 $string1.$string2 does not always work properly
Submitted: 2003-04-29 21:01 UTC Modified: 2003-04-30 06:19 UTC
From: janez at pinkponk dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.3.2RC2 OS: XP
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.
Block user comment
Status: Assign to:
Bug Type:
From: janez at pinkponk dot com
New email:
PHP Version: OS:


 [2003-04-29 21:01 UTC] janez at pinkponk dot com
Short description:
$string1='<?php ';
$string2= fread( IE6.0 saved file from "Google Search: rmdir"
$string3=' ?>'

 or newstring=implode($strings -from array)

instead of $string1.$string2.$string3 I get the following: $string1.''.$string2.$string3

I don't know why there should be an '' in the file. A file saved IE6.0 from works fine. And so do other files. I tried opening files both in ascii and binary-forced mode. It seems that there is a problem with string concatenation.
Anyway, even if it's not a bug (I'm new to PHP), I would like to know how to circumvent it.

Source code at


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-30 05:38 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.


 [2003-04-30 06:19 UTC] janez at pinkponk dot com
Sorry to bug you for There is a bug anyway, as I found out, but not in PHP, but in IE6.0, that saved that page. Instead of adding "<!DOCTYPE HTML PUBLIC " in the beginning of the file, IE6.0 added "<!DOCTYPE HTML PUBLIC ".
But "" at the beginning of file was happily ignored by most of windows texteditors if it occured at the beginning of the file. I had to use WinHex to see it at the beginning...

Happy coding :)
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Jul 13 08:01:25 2020 UTC