Re: PHP 5.3.3 operator & problem
| From: | Simon J Welsh | Date: | Thu, 02 Jun 2011 02:53:39 +0000 |
| Subject: | Re: PHP 5.3.3 operator & problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-313306@lists.php.net to get a copy of this message | ||
On 2/06/2011, at 2:44 PM, 李白|字一日 wrote:
> hi, all
>
> i currently have a project which using & operator on creating a new object.
>
> like:
> $class =& new Class();
>
> it works properly in php 5.1.6,
> but not in php 5.3.3
> and it gives offset errors to me.
>
> is there anyone knows why and how to fix this problem?
In PHP 5, objects are always assigned by reference, you do not need to make it explicit.
---
Simon Welsh
Admin of http://simon.geek.nz/