The drawer that remembers
A function with one static variable and one normal variable, called three times.
<?phpfunction visit(): void{ static $count = 0; $local = 0; $count++; $local++; echo "count $count, local $local", PHP_EOL;}visit();visit();visit();1. Predict the output
Tap the lines in the order you think they print.
- 1…
- 2…
- 3…