Embed comment into source code. in PHP
Embed comment into source code.
// handles string after // as comments.
// can be written after statement like function, assigning variable, etc...
# also can be used like //
/* - */ hansles string included by /* */ as comments.
/* - */ can be embedded between statements.
/* - */ can not be embedded into other /* - */.
comment.php
<?php
// This is one line comment
echo "One line comment can be written after statement\n"; // This is one line comment
# This is one line comment
echo "One lin comment can be written with // and #\n"; # This is one line comment
/* This comment style can be written in multi lines like the following */
/*
  line 1
  line 2
*/
/* This comment style can be embedded in statement */
echo "This echo statement line includes " /* comment */. "comment\n";
?>

      
Result
$ php comment.php
One line comment can be written after statement
One lin comment can be written with // and #
This echo statement line includes comment