Write a function Counter() that keeps track of the number of times it is called. This function should not take any parameters and return the number of times that it has been called.
Example:
echo Counter();//1
echo Counter(); //2
I think I would go like this...
$count = 0;
function Counter() {
$count = $count + 1;
}
Is this too simple? Am I doing it wrong