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.
__________________