update : 2015.11.03
php.shukuma.com검색:
|
Using namespaces: fallback to global function/constant(PHP 5 >= 5.3.0) Inside a namespace, when PHP encounters an unqualified Name in a class name, function or constant context, it resolves these with different priorities. Class names always resolve to the current namespace name. Thus to access internal or non-namespaced user classes, one must refer to them with their fully qualified Name as in: Example #1 Accessing global classes inside a namespace
<?php For functions and constants, PHP will fall back to global functions or constants if a namespaced function or constant does not exist. Example #2 global functions/constants fallback inside a namespace
<?php |