#37049 [Opn->Bgs]: ?> in // line breaks out of php mode

From: Date: Wed, 12 Apr 2006 06:37:03 +0000
Subject: #37049 [Opn->Bgs]: ?> in // line breaks out of php mode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-95647@lists.php.net to get a copy of this message
ID: 37049 Updated by: derick@php.net Reported By: rishi at Udel dot edu -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: OSX, linux PHP Version: 5.1.2 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php . Previous Comments: ------------------------------------------------------------------------ [2006-04-12 02:59:06] rishi at Udel dot edu Description: ------------ This is similar to bug 12323 but still exists in php5 (i'm using 5.0.1) The following code should produce no output. However, it seems that the "?>" in the comment line breaks out of php interpretation mode and switches to direct output mode. The actual result appears in command line mode and browser mode. I actually came upon the problem because in a more complicated script, it produced compile errors. However, in this simple script it produces unexpected output only. Reproduce code: --------------- <?php //echo "?>\n".$buffer; ?> Expected result: ---------------- No ouput Actual result: -------------- \n".$buffer; ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37049&edit=1

« previous php.bugs (#95647) next »