#43028 [Opn->Bgs]: Import statement ignored in eval
| From: | johannes@php.net | Date: | Fri, 19 Oct 2007 08:29:27 +0000 |
| Subject: | #43028 [Opn->Bgs]: Import statement ignored in eval | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-118700@lists.php.net to get a copy of this message | ||
ID: 43028
Updated by: johannes@php.net
Reported By: felipensp at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 5.3CVS-2007-10-19 (snap)
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
eval is in it's own context so the import only works inside the eval'd
code
Previous Comments:
------------------------------------------------------------------------
[2007-10-19 01:31:40] felipensp at gmail dot com
Description:
------------
Eval is ignored when execute import statement.
Reproduce code:
---------------
eval("import self::x as a;");
a::foobar::test();
---
namespace self::x;
class foobar {
static public function test() {
print "Foobar!\n";
}
}
Expected result:
----------------
Foobar!
Actual result:
--------------
Fatal error: Class 'a::foobar' not found
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43028&edit=1