From: Operating system: All PHP version: 5.3.2 Package: Scripting Engine problem Bug Type: Feature/Change Request Bug description:Add error reporting level for namespace fallback
Description:
------------
Hello,
currently it's not possible to see if PHP tries to fallback to a global
function/constant when the function/constant isn't found in the current
namespace.
This can lead to perfomence problems when developers convert older classes
to PHP 5.3 namespaces and forget to prefix standard functions with a
backslash.
This also helps people to learn what functions need to be called from the
global space and which not.
Test script:
---------------
namespace Foo;
function bar() {
// would be nice if that would trigger a warning
return phpversion();
}
function baz() {
// no warning
return \phpversion();
}
Expected result:
----------------
a error level constant E_NAMESPACE_FALLBACK to use for error_reporting()
--
Edit bug report at http://bugs.php.net/bug.php?id=52275&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=52275&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=52275&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=52275&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=52275&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=52275&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=52275&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=52275&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=52275&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=52275&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=52275&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=52275&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=52275&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=52275&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=52275&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52275&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52275&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=52275&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=52275&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=52275&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=52275&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=52275&r=mysqlcfg
