php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18892 heredoc crashes php
Submitted: 2002-08-13 18:39 UTC Modified: 2002-09-19 21:09 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: barrett dot harber at verizon dot net Assigned: zeev (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 4.2.2 OS: Windows 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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: barrett dot harber at verizon dot net
New email:
PHP Version: OS:

 

 [2002-08-13 18:39 UTC] barrett dot harber at verizon dot net
I am running Apache 1.3.24.

This works:
<?
echo <<<END
abcdefg
END;
?>

This does not work
<?
echo <<<END
123456
END;
?>

<?
echo <<<END
abcdefg

END;
?>

There are no white spaces after <<<END btw.
Please resolve this i sort of need to use it. It worked on my linux box just fine with a slightly older version of php

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-13 19:29 UTC] edink@php.net
Just tested all of your examples on a Windows 2000 machine, and on command line, and cannot reproduce your problem.

What do you mean by "crash" exactly? Do you get any error messages?
 [2002-08-14 17:36 UTC] barrett dot harber at verizon dot net
maybe its just an xp thing... look at this file the source is below

http://barrett.servebeer.com/test/heredoc_test.php

/*-----------source------------//

<pre>

<a href="http://barrett.servebeer.com/test/heredoc_test.php?template=1">template</a>
<a href="http://barrett.servebeer.com/test/heredoc_test.php?template=0">no template</a>

<?php
if ($template = "1") {
echo <<<END
<a name="template"></a>
<P></P>
 <UL>
  <LI><A HREF="http://www.blank.com/" TARGET="_blank">1</A> - blah</LI>
  <LI><A HREF="http://www.blank.com/" TARGET="_blank">2</A> - blah</LI>
  <LI><A HREF="http://www.blank.com/" TARGET="_blank">3</A> - blah</LI>
 </UL>
END;
} 
if ($template = "0") {
echo "click template";};
?>

</pre>

//-----------source------------*/
 [2002-09-18 19:31 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

Unable to reproduce using 4.3.0-dev on Windows XP or Windows 2000.
 [2002-09-19 11:22 UTC] zeev@php.net
Unable to reproduce under latest CVS
 [2002-09-19 21:09 UTC] sniper@php.net
I can't reproduce this anymore either. Assumed fixed in CVS. (the unstable snapshots..if you want to try) 

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 08:01:28 2024 UTC