0
diffrent between global keyword...
What is deffrent betwing global keyword and global scope ?
1 Answer
0
When you are writing a program with oop structure or with some funtion then the area of the function is kind of local scope, or in class the class is also local scope. Otherwise everything is global scope. Variable or object that takes place in the global scope, is global keyword.
<?php
//this is global scope
$var1; //this is a global keyword
function func_name(){
//inside the function, local scope
}
//this is outside of the function and global scope
?>