php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32487 ignore comment and drop out php mode
Submitted: 2005-03-29 17:43 UTC Modified: 2005-03-29 18:36 UTC
From: ortho at mail dot dk Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.3.10 OS: RH 9.0
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ortho at mail dot dk
New email:
PHP Version: OS:

 

 [2005-03-29 17:43 UTC] ortho at mail dot dk
Description:
------------
when encountering code below, php 
1) ignores the comment
2) apparently leave php-mode

note: error 2) makes the rest of the php-script code show up in browser (as result of leaving php)

Reproduce code:
---------------
// $Idxhtm = str_replace('<?php print $I_fmGetpage; ?>', '#pgnum', $Idxhtm));

notes: 
allthouh it is commented out, the code intended to replace a php-tag in a string containing a html form. The php-tag is single quoted and should be replaced with #pgnum - no fuzz.

removing commented line solves problem.

Expected result:
----------------
nuthin - it should be regarded as a comment by php

Actual result:
--------------
sleepless hours - dry throat - nervous breakdown and backpain

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-29 17:51 UTC] tony2001@php.net
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 http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

http://www.php.net/manual/en/language.basic-syntax.comments.php
 [2005-03-29 18:08 UTC] ortho at mail dot dk
arrg - the man page about this actually says this !

never dreamed that there was such a special case where a comment is not a true comment if a ?> is encountered after a 1-line //.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 17 15:01:28 2024 UTC