PHP·98 questionsWhat is variable scope?SaveUpdated: 2026-08-31Answer•Local — inside a function.•Global — outside functions.•global $var — access to global.•static — retains value between calls.•$GLOBALS['var'] — alternative to global.Ask AI to clarifyWas this answer helpful?HelpfulNot helpfulSuggest an improvement