Created
October 17, 2012 03:08
-
-
Save fivestar/3903500 to your computer and use it in GitHub Desktop.
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 | |
namespace test { | |
define('FOO', 1); | |
const BAR = 2; | |
} | |
namespace { | |
var_dump(defined('FOO')); // true | |
var_dump(defined('test\\FOO')); // false | |
var_dump(defined('BAR')); // false | |
var_dump(defined('test\\BAR')); // true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment