Created
April 19, 2016 17:03
-
-
Save mkantor/9669d44a48f3ba018daae2f747e217c7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 requirer.php | |
before php tag in required.php | |
inside php tag in required.phpafter php tag in required.php | |
require_result: 1 | |
global_var: global var from required.php |
This file contains hidden or 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
before php tag in required.php | |
<?php | |
global $global_var; | |
$global_var = "global var from required.php"; | |
echo "inside php tag in required.php"; | |
?> | |
after php tag in required.php |
This file contains hidden or 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 | |
$require_result = require("required.php"); | |
echo "require_result: $require_result\n"; | |
echo "global_var: $global_var\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment