Created
July 1, 2014 14:42
-
-
Save MadaraUchiha/8bee98a9ad341f7c1335 to your computer and use it in GitHub Desktop.
Global Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$variable = "This will be global!"; | |
include "slave.php"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function whatever() { | |
global $variable; | |
echo $variable; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment