PHP - Functions
You want to count how many times a function is called using a global variable. Which code correctly updates the global counter inside the function?
global $counter; to access the global variable.$counter++; to count calls correctly.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions