Bug #51174 [Opn->Csd]: error "expected to be a reference" when $this referenced in an array property

From: Date: Tue, 10 Mar 2020 08:46:45 +0000
Subject: Bug #51174 [Opn->Csd]: error "expected to be a reference" when $this referenced in an array property
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225990@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=51174&edit=1

 ID:                 51174
 Updated by:         cmb@php.net
 Reported by:        skrol29forum at gmail dot com
 Summary:            error "expected to be a reference" when $this
                     referenced in an array property
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   Win7
 PHP Version:        5.3
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

> the issue has been solved as of PHP 7

So closing.


Previous Comments:
------------------------------------------------------------------------
[2015-08-18 18:57:10] cmb@php.net

JFTR: the issue has been solved as of PHP 7, see
<https://3v4l.org/PSGk9>.

------------------------------------------------------------------------
[2010-09-15 01:15:35] jeremy at tuxmachine dot com

See also bug 50394.

------------------------------------------------------------------------
[2010-07-23 01:43:42] heis dot turtlemad at gmail dot com

Same failure running Php5.3.2 on FreeBSD8

david:~>php test.php
arg_array[0]  is the 
same instance than $this  <br>
prop=1 <br>
arg_array[0]  is the 
same instance than $this  <br>

Warning: Parameter 1 to f_test() expected to be a reference, value given in /usr/home/david/test.php
on line 15

------------------------------------------------------------------------
[2010-06-21 00:03:55] felipe@php.net

I can reproduce it.

array(1) {
  [0]=>
  &object(clsTest)#1 (2) {
    ["prop"]=>
    int(0)
    ["arg_array"]=>
    *RECURSION*
  }
}
prop=1 <br>
array(1) {
  [0]=>
  object(clsTest)#1 (2) {
    ["prop"]=>
    int(1)
    ["arg_array"]=>
    *RECURSION*
  }
}
PHP Warning:  Parameter 1 to f_test() expected to be a reference, value given

------------------------------------------------------------------------
[2010-03-01 08:24:57] skrol29forum at gmail dot com

I've inverted "Expected result" and "Actual result".

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=51174


--
Edit this bug report at https://bugs.php.net/bug.php?id=51174&edit=1


Thread (7 messages)

« previous php.bugs (#225990) next »