Jump to content

@param ?


redyard

Recommended Posts

Hi all,

 

I've been working through php codeto connect to Google checkout, the code is supplied by

http://www.phpgcheckout.com/

 

Through out the code there is the use of @param within comments but the @param is colored as if it's not commented out (I'm using textmate so it's colored dark blue).

 

Is this @param importanat to the code or is it part of the commenting.

 

I'm asking because I wanted to reorganise the code by deleting returns and white space so I can read it easier.

 

 

/**
* Builds Google Checkout Button Constructor
*
* @param unknown_type $gCart
* @param unknown_type $size
* @param unknown_type $style
* @param unknown_type $variant
* @return gButton
*/

 

 

Thanks

 

c.

Link to comment
https://forums.phpfreaks.com/topic/69205-param/
Share on other sites

Anything that is between the /* and */ will be commented out - you don't need to worry, there is no code that is executed. Im not entirely sure why they have placed the @ sign in the comments; perhaps it was for the developers.

 

As for why it appears coloured, ive never used that particular application so i cannot be sure, but i would guess that it highlights anything where you suppress errors. The @ symbol is used to ignore errors on a single line.

Link to comment
https://forums.phpfreaks.com/topic/69205-param/#findComment-347836
Share on other sites

That has nothing to do with PHP. PHP ignores all text between /* and */ or after // or # . However it does have something to do with third apps such as phpDoc which can process comments to create documentation for a specific function/class or block of code within a script.

Link to comment
https://forums.phpfreaks.com/topic/69205-param/#findComment-347853
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.