Tag Archives: variable scope

Variable scope in PHP

PHP having four different scopes: local global static parameters Local Scope A variable which is declared within function called Local scope. Local variables are release once function completed. <?php function localscope(){ $a = 10; // Local Scope echo $a; } localscope(); ?> Global Scope A variable defines outside of function is called Global variables and […]