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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 08:01:34 2025 UTC