Raised This Month: $ Target: $400
 0% 

register_plugin, defines and constants.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EthicalHacker007
Veteran Member
Join Date: May 2014
Old 06-10-2014 , 07:02   register_plugin, defines and constants.
Reply With Quote #1

I wanted to know that why do most of the coders use defines for registering plugin.

Plugin can be registered using
PHP Code:
register_plugin"My plugin name" "My plugin version" "My Name" 
So why do most of them use

PHP Code:
#define PLUGIN "My plugin name"
#define VERSION "My plugin version" 
#define AUTHOR "My Name" 

register_plugin PLUGIN VERSION AUTHOR 
And rarely, some use constants like

PHP Code:
new const[VERSION] = "My plugin version" //This might be wrong. 
My question is which is best?

1, 2 or 3? In wiki, they have said that constants are better than defines.
__________________
EthicalHacker007 is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode