[Solved] How to use DEFINE vars inside functions

The scope of a constant is already global, so just use them as they are: define(‘VAR1’, ‘xxxxxxxxxx’); define(‘VAR2’, ‘xxxxxxxxxx’); define(‘VAR3’, ‘xxxxxxxxxx’); function myFunction() { echo VAR1; // I need to access VAR1, VAR2, VAR3 here } $output = myFunction(); 1 solved How to use DEFINE vars inside functions