if you have to use many global variables inside of your function, something has been designed wrong.
Using even a few global variables considered bad practice, making code non-obvious.
And constants are not a solution despite of falseness of that "badly performance" rumor
If you need to use many variables inside of a function, consider array use
$data = array("one","two","three");
$result = myfunc($data);
simple, reliable and readable
with more detailed explanation of what this function do and what all these variables for, you can get more precise answer.