dakranii
Member
Posted 2 years ago #
This should be pretty easy. In HTML you can leave yourself notes in the code with
<!-- notes -->
What is the PHP equivalent? I feel like I've seen // or /* but I'm not sure what works or how to end it exactly. And search-engine searches for // or <!-- or /* aren't giving me answers.
Thank you!
s_ha_dum (was apljdi)
Member
Posted 2 years ago #
// comments out to the end of the line
/* starts a multiline comment
*/ ends a multiline comment
Searching for anything besides alphanumeric characters is frustrating, but searching for 'PHP comment' will get you exactly what you want.
/* Comment */
Is the same method used in CSS.
I generally use the single line approach myself..
// Comment
You know, you could of opened any number of WordPress files to find this out, the config file would have been an easy one (wp-config.php).
dakranii
Member
Posted 2 years ago #
t31os_, right, I suppose I could have just opened a file and looked.
But I got nice commentary on the differences between them from apljdi (single line vs. mutli-line) and some good links from whooami that will make my eyes bleed from reading. :-)
Thank you everyone for the quick and helpful replies.
As long as everyone's happy.. :)
just to add for completion, there's also
#comment
which is equivalent to
//comment
in php