php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12172 Failure to bind a variable to an object's method that returns a reference
Submitted: 2001-07-14 21:45 UTC Modified: 2001-12-14 14:49 UTC
From: mubarmej at muvix dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.6 OS: Windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mubarmej at muvix dot com
New email:
PHP Version: OS:

 

 [2001-07-14 21:45 UTC] mubarmej at muvix dot com
The following line will give a compilation error:

$arr = array( $stuff, &$this->refAll() );

refAll() is a method of the class that returnes a reference.

This work around works:

$ref = &$this->refAll();
$this->stack[] = array( $stuff, &$ref );

But i think that the one line solution should work too.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-14 14:49 UTC] yohgaki@php.net
This is not a bug....
Referece to a function cannot be a LVALUE.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 20:01:46 2025 UTC