1.2.445. Fallback Function¶
A function that is called with its name alone, and whose definition is in the global scope.
<?php
namespace {
// global definition
function foo() {}
}
namespace Bar {
// local definition
function foo2() {}
foo(); // definition is in the global namespace
foo2(); // definition is in the Bar namespace
}
?>
See also Using namespaces: fallback to global function/constant.
1.2.445.1. Specs¶
Short name |
Functions/FallbackFunction |
Rulesets |
|
Exakat since |
1.1.4 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Features |
function, fallback-function |
Available in |