Re: Question on "use" behavior
| From: | Greg Beaver | Date: | Thu, 20 Dec 2007 21:57:03 +0000 |
| Subject: | Re: Question on "use" behavior | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34185@lists.php.net to get a copy of this message | ||
Martin Alterisio wrote:
> Consider the following code:
>
> test.php:
> <?php
> include 'foo.php';
> use test::foo;
> foo();
> ?>
>
> foo.php:
> <?php
> namespace test;
> function foo() { }
> ?>
>
> Is it expected behavior that the scripts ends in:
> Fatal error: Call to undefined function foo()
> ?
Hi Martin,
No. This is a bug, I was alluding to it in an earlier email, but you
know how time eats up one's life, so I haven't reported it and would
grateful if someone would (or Dmitry/Stas would just know why it is
broken and fix it :)
Greg