Bug 76329 - kdevelop uses the wrong comment marks for PHP files
Summary: kdevelop uses the wrong comment marks for PHP files
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: PHP (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-28 01:22 UTC by Marco Krohn
Modified: 2013-03-31 01:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Krohn 2004-02-28 01:22:20 UTC
Version:           3.0.90-CVS (using KDE 3.2.90 (CVS >= 20040117), compiled sources)
Compiler:          gcc version 3.3.3 20040125 (prerelease) (Debian)
OS:          Linux (i686) release 2.4.23-1-k7

open any php file and press CTRL+D for "comment". This inserts a "//", but should in most cases use the "#" sign. In some cases, for instance here

<html>
  <head>
   <title>PHP Test</title>
  </head>
  <body>
  <?php echo '<p>Hello World</p>'; ?>
  
the html comment tags should be used: <!--, resp. -->
Comment 1 Sascha Cunz 2004-02-28 02:34:16 UTC
How do you come to think, that there should be "#"-style comments in a PHP file? I cannot remember PHP to recognize this as a comment.

If we can clearify this issue then i'd like to decrease severity to wishlist, because:
a) in a pure php file, there is no <!-- comment -->-style comment
b) it would require a rewrite of most of the phpsupport code.
Comment 2 Marco Krohn 2004-02-28 10:37:51 UTC
On Saturday 28 February 2004 02:34, Sascha Cunz wrote:

> How do you come to think, that there should be "#"-style comments in a PHP
> file? I cannot remember PHP to recognize this as a comment.

Ups, not? I started learning PHP yesterday. I only knew that it was the wrong 
comment mark in the html file and start looking for how a comment in php 
works. AFAIK wikipedia (wikipedia.org) uses php therefore I looked into their 
source code and found things like:


        # Static factory methods
        #
        function newFromDBkey( $key )
        {
                $t = new Title();
                $t->mDbkeyform = $key;
                if( $t->secureAndSplit() )

making me believe that "#" is the right comment "tag". Looking in the php 
documentation I found that C/C++ style comments are the right thing--sorry, 
my mistake.

BTW thanks again for the support in kdevelop it really made the start a whole 
lot easier :-)

> If we can clearify this issue then i'd like to decrease severity to
> wishlist, because: a) in a pure php file, there is no <!-- comment
> -->-style comment
> b) it would require a rewrite of most of the phpsupport code.

makes sense to me. Thanks.

Comment 3 Jens Dagerbo 2005-02-03 20:59:50 UTC
Can someone explain why this BR is open? Did we forget to close it, or is there still a problem here that I don't understand? (Not unlikely, given my zero knowledge of PHP.)
Comment 4 Amilcar do Carmo Lucas 2005-02-03 23:08:36 UTC
PHP can use

c comments:  /*    */
c++ comments: //
add bash like comments: #

But as far as I know c/c++ comments are the way to go.
Closing.