What if you create a function that uses 3 parameters, then you call this function 3 times in 3 different php files in 3 different directories, then you had to modify the function to use 6 parameters, but changing the order of the 3 old parameters with the 3 new parameters?
Everytime you add a parameter to function, you will have to search and replace with regular expression in multiple directories to change the calls to the function. That is really complicated! I do not want to add a security risk to my site. What are the best ways to avoid using globals?
By the way, if I pass 10 variables to a function, then change the 10 variables, then return 10 variables, then call the function, will I already be able to use the variables out of the function or will I yet have to assign the returned 10 variables to 10 variables?
Start Free Trial