PHP·98 questions

What is variable scope?

Answer
Local — inside a function.
Global — outside functions.
global $var — access to global.
static — retains value between calls.
$GLOBALS['var'] — alternative to global.
Was this answer helpful?

More questions in this topic

Related questions from other topics