Static variable retains their value across multiple function calls. Let us take an example: Here, the $eaten_count static variable is initialized to 1 and then incremented when if block is entered. So, that the Eaten is echoed only once. This
What is a static variable in PHP?
