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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 02:01:30 2024 UTC