I have a function that I am trying to run but it shows the message as CONSTANT already defined.
I tried to put a condition saying \"if defined\" about the function
Is this how you check for constants:
if (defined('TEST')) { echo TEST; }
Maybe you're not doing the check properly OR the constant you are checking for isn't the cause of the error, some rogue include file might have a different constant and produces an overlap / re-definition.