Re: Call it: allow reserved words in a class or not?
| From: | Josh Thompson | Date: | Fri, 07 Nov 2008 04:19:27 +0000 |
| Subject: | Re: Call it: allow reserved words in a class or not? | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-41747@lists.php.net to get a copy of this message | ||
Stan Vassilev | FM wrote:
use foo\bar\*; $a = new A(); $b = new B(); ...I may be asking this question out of ignorance, but here goes: What is the difference between the following snippets? // global.php use \foo\bar\*; $a = new A(); $b = new B(); // namespaced.php namespace \foo\bar; $a = new A(); $b = new B(); I don't understand why in the namespaced example no one seems to have a problem with new A() meaning new \foo\bar\A(), but we can't use the * wildcard to do the same thing? -- Joshua Thompson Mechanical Engineer/Software Developer http://www.schmalls.com