Re: Re: import/use last call
| From: | Giedrius D | Date: | Tue, 23 Oct 2007 17:42:46 +0000 |
| Subject: | Re: Re: import/use last call | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-32933@lists.php.net to get a copy of this message | ||
On 10/23/07, Gregory Beaver <greg@chiaraquartet.net> wrote:
> The same confusion that is brought about by allowing keywords as
> variable names?
>
> <?php
> class Test
> {
> public $class;
> }
>
> $a = new Test;
> $a->class = 1;
> ?>
>
> Is this next example any more confusing?
>
> <?php
> class Test
> {
> function class(){}
> }
>
> $a = new Test;
> $a->class();
> ?>
>
> I think you're confused by what is proposed :).
Yes you are right about the methods but consider something like this:
<?php
namespace (Foo::Bar);
import(new new);
// etc.
?>
Looks kinda odd to me although it might have sense in some context.
Anyway my main question was: is there any reason not to use keyword "use"?
Giedrius