ID: 44653
Updated by: [EMAIL PROTECTED]
Reported By: jreich at jreich dot com
-Status: Assigned
+Status: Closed
Bug Type: Scripting Engine problem
PHP Version: 5.3CVS-2008-04-06 (snap)
Assigned To: dmiry
New Comment:
Fixed name resolution for the second case (b.php), however warning for
the first case (a.php) is not removed.
Previous Comments:
------------------------------------------------------------------------
[2008-04-06 13:26:00] jreich at jreich dot com
Description:
------------
Using a non-compound name in a use statement results in a warning that
states non-compound names in use statement would have no effect which
isn't true as the following reproduce code shows.
Reproduce code:
---------------
<?php // a.php
namespace Test1;
function fooBar() { echo 'Test1::fooBar()' . PHP_EOL; }
namespace Test2;
use Test1;
Test1::fooBar();
<?php // b.php
namespace Test1;
function fooBar() { echo 'Test1::fooBar()' . PHP_EOL; }
namespace Test2;
Test1::fooBar();
Expected result:
----------------
No warning or same behavior with and without use statement.
Actual result:
--------------
Executing a.php results in "Warning: The use statement with
non-compound
name 'Test1' has no effect in [...]".
Executing b.php results in "Fatal error: Class 'Test2::Test1' not found
in [...]".
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44653&edit=1