Re-JeeP Posted September 30, 2006 Share Posted September 30, 2006 Hi!Where can I learn to use theese kind of comments in php?/*******/// Johan Quote Link to comment https://forums.phpfreaks.com/topic/22597-comments-in-php/ Share on other sites More sharing options...
AndyB Posted September 30, 2006 Share Posted September 30, 2006 What do you want to learn about them? Quote Link to comment https://forums.phpfreaks.com/topic/22597-comments-in-php/#findComment-101399 Share on other sites More sharing options...
wildteen88 Posted September 30, 2006 Share Posted September 30, 2006 You can learn about comments over at [url=http://www.php.net/manual/en/language.basic-syntax.comments.php]php.net[/url] Quote Link to comment https://forums.phpfreaks.com/topic/22597-comments-in-php/#findComment-101400 Share on other sites More sharing options...
obsidian Posted September 30, 2006 Share Posted September 30, 2006 [quote author=Re-JeeP link=topic=110079.msg444250#msg444250 date=1159629666]Where can I learn to use theese kind of comments in php?[/quote]looks like you already know how to use them. basically, andything between your opening '/*' and closing '*/' will be a comment, and the second type is simply a single-line comment. anything following the '//' on that line will be commented out. Quote Link to comment https://forums.phpfreaks.com/topic/22597-comments-in-php/#findComment-101402 Share on other sites More sharing options...
GuitarGod Posted September 30, 2006 Share Posted September 30, 2006 There isn't much to learn about them.[code]/**** I CAN MAKE A* FEW COMMENTS* HERE***/[/code][code]/*I CAN ALSO MAKECOMMENTS LIKETHIS */[/code]As long as all your comments are between the /* and */, you can pretty much do whatever you want ;) Quote Link to comment https://forums.phpfreaks.com/topic/22597-comments-in-php/#findComment-101403 Share on other sites More sharing options...
Re-JeeP Posted September 30, 2006 Author Share Posted September 30, 2006 Hmm...I tought that when you for example made an API you used comments like that to describe the class.For example in java...http://java.sun.com/j2se/1.5.0/docs/api/ Quote Link to comment https://forums.phpfreaks.com/topic/22597-comments-in-php/#findComment-101539 Share on other sites More sharing options...
extrovertive Posted September 30, 2006 Share Posted September 30, 2006 Here's what you need to learn about comments.One comment in PHP // are mainly use for describing something brief about something in your code.//loop variable to display names//This variable will increment by 3 each every Wednesdayand so on...Multi-line comment can be used for fancy stuff needing a lot explanation in your source code./**************** Title: My code* Author: me!* Date: Today* Program: PHP prog.* Descripton: Blah blah blah...**************//*Function: Blah@params: $one - it does this$two - it does thatBlah blah...*/Avoid using comments which state the obvious.//this is a for-loop Quote Link to comment https://forums.phpfreaks.com/topic/22597-comments-in-php/#findComment-101542 Share on other sites More sharing options...
AndyB Posted September 30, 2006 Share Posted September 30, 2006 Other than holding to the right syntax for comments in php, how many, what style, and how extensive they are is entirely a matter of choice - yours.Two suggestions:#1 - adopt a consistent style for comments of various types#2 - always assume that your code isn't intuitively obvious to the next person who reads it (and that might be you six months later). Provide comments that help explain the code. Quote Link to comment https://forums.phpfreaks.com/topic/22597-comments-in-php/#findComment-101558 Share on other sites More sharing options...
trq Posted October 1, 2006 Share Posted October 1, 2006 [quote]I tought that when you for example made an API you used comments like that to describe the class.[/quote][url=http://phpdoc.org]phpdoc[/url] is what your looking for. Quote Link to comment https://forums.phpfreaks.com/topic/22597-comments-in-php/#findComment-101691 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.