Which statement correctly describes the behavior of the `static` keyword when used with variables inside a function?

PHP Intermediate Medium

PHP Intermediate — Medium

Which statement correctly describes the behavior of the `static` keyword when used with variables inside a function?

Key points

  • Static variables persist across function calls
  • Static variables remain local to the function scope
  • Initialization occurs only during the first function call

Ready to go further?

Related questions