php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11660 Getting values by reference don't work
Submitted: 2001-06-25 09:07 UTC Modified: 2001-06-26 02:46 UTC
From: andrej dot aschenbrenner at face dot de Assigned:
Status: Not a bug Package: COM related
PHP Version: 4.0.6 OS: Windows NT 4.0 SP 6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: andrej dot aschenbrenner at face dot de
New email:
PHP Version: OS:

 

 [2001-06-25 09:07 UTC] andrej dot aschenbrenner at face dot de
Example:

$user = "test_user";
$allowed = 8;

$instance = new COM("dll.CObject") or die("Unable to
instanciate dll.CObject");
$instance->CheckLogin($user, COM_REMOTE_SERVER, &$allowed);

echo $allowed;

$allowed has always the value that you have specified
above, here: 8; When I change $allowed to 6788, then
I get 6788. It seems that the variable won't be changed
when you pass it by reference.
It doesn't matter if i use the & sign or not!
Note that the variable $allowed have to be integer,
I can't pass a variant type to the COM-Function CheckLogin.

The same has been working with previous versions of PHP,
until 4.0.5 and above.

In need this functionality because i use a lot of stuff
like that: 

$instance->some_function(&$var1, &$var2, &$var3);

any clue, what's going up?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-26 02:46 UTC] derick@php.net
Submitted twice
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Aug 16 14:05:50 2022 UTC