Global VS Local Variable in PHP

Global Variable
Called a global variable if the variable and its value can be recognized and used by all parts of the script that need it. These variables must be declared global in the function.




Screen Output:




Local Variable
Is a variable that can only be used by the function where the variable is declared.
This script will tell which variable is Global or Local.


Author: BukanDarahBiru aka PangeranAntok


Share on Google Plus

About Elmirakom

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment