ARudik / phc

Automatically exported from code.google.com/p/phc
0 stars 0 forks source link

Comment containing end-of-script tag disappears #55

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When a script is terminated by an end-of-script tag in a comment, that
comment will disappear in the output:

<?php
  // A php-style end tag in a comment must be honored
  echo "foo";
        // ?> 
  echo "bar";
?>

is unparsed as

<?php
        // A php-style end tag in a comment must be honored
        echo "foo";
?>

  echo "bar";
?>

Which, though semantically equivalent, is lacking the comment. Note that if
we fix this, and we do output the comment, the script should not be
terminated again by another "?>".

Original issue reported on code.google.com by edskodev...@gmail.com on 11 Nov 2007 at 1:13