title: How to configure emacs to properly comment code in php-mode?
body: <p>I have emacs 23.3.1, running on windows. </p>
  
  <p>php-mode 1.5 from  <a href="http://php-mode.sourceforge.net/" rel="nofollow noreferrer">http://php-mode.sourceforge.net/</a>, 
  Modified: 2008-11-04</p>
  
  <p>I <em>think</em> this used to work, but now, when I try to comment out a block of code, using 
  comment-region, which is an interactive
  compiled Lisp function in `newcomment.el', I get poor results. </p>
  
  <p>Example: </p>
  
  <p>before: </p>
  
  <p><img src="https://i.stack.imgur.com/RrDGD.png" alt="enter image description here"></p>
  
  <p>after: </p>
  
  <p><img src="https://i.stack.imgur.com/THVVE.png" alt="enter image description here"></p>
  
  <p>You can see that each line in the commented block has the single-line comment start sequence <code>//</code>, and the multi-line comment-end sequence <code>*/</code>.  </p>
  
  <p>This is not a huge problem, though it is ugly. The problem comes in when I try to uncomment the block.  I get an error, "Can't find comment end".  In other words, <code>comment-region</code> is not reversible with <code>C-u comment-region</code>. </p>
  
  <p>I'll see if I can figure this out, but is there a setting I am missing in php-mode? </p>
  
  <p>Anyone know?</p>
  
  <hr>
  
  <p><strong>MORE</strong></p>
  
  <p>I didn't put anything in my php-mode-hook function to change the <code>comment-start</code> and <code>comment-end</code> variables.  When I debug <code>comment-region</code> I can see they get set to the mismatched pair of <code>//</code> and <code>*/</code> somehow.  That explains the weird results of comment-region. I don't believe it's my code that does sets those variables like that.</p>
  
  <p>I tried setting them explicitly in my hook to <code>//</code> and (empty string). In that case, the <code>comment-region</code> looks prettier but it still does not uncomment.  I also tried the matched pair of <code>/*</code> and <code>*/</code>, but that gave the same results.  Uncomment does not succeed; the error is <code>can't find comment end.</code> . </p>
  
  <p><strong>MORE2</strong></p>
  
  <p>I think my syntax table is correct.  It shows this: </p>
  
  <p><img src="https://i.stack.imgur.com/PKPTf.png" alt="enter image description here"></p>
  
  <p>...which seems right to me.</p>