![]() * of defining the comment - the multi line comment is still onlyĪlso keep in mind that anything within a code comment is not executed – so even if it is PHP, the comment indication means the code will be ignored as part of the comment. * The extra "*" leading the line doesn't mean anything in terms * used in WordPress itself as well as plugins and themes. * Because docblocks are a specific standard, you'll see them * comments, which are generally used as inline code documentation. * Sometimes you'll see a multi-line comment used like this, with Multi-line comments are preceded by "/*" and end with the reverse a line that comes after // is a comment and is ignored during anything that comes after it on that same line. This type of comment only marks a single line at a time (and PHP comments are marked in two ways:ĭouble forward slashes // Anything preceded by double forward slashes is a comment. What is most important is to know what is and what is not a comment. But if you don’t know or aren’t sure what you can or cannot take out, leave them in. You don’t have to keep them in there, or you can – like I said, they are not necessary to code execution. They tell you what you can (or cannot/should not) change.They tell you what a specific line or section is doing.They are used to tell you a few different things: But they are not necessary to code execution. Code CommentsĬomments are included in the code to help you. If the code is a code snippet hosted on GitHub, it will open with
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |