Re: Suggested change: change priority of new and ->
| From: | Mcmuffin Mcguffin | Date: | Sat, 17 Feb 2018 14:04:47 +0000 |
| Subject: | Re: Suggested change: change priority of new and -> | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-101881@lists.php.net to get a copy of this message | ||
>
> Is that creating an instance of the class name stored in the 0th index of
> the array $var or is it creating an instance of the class name stored in
> $var and accessing the 0th index using ArrayAccess?
>
As soon as $var gets involved, it should be prioritized above the new
operator. So it's equivalent of "new ($var[0])"
Jaroslav