note 72957 deleted from function.call-user-method by cmb
| From: | cmb@php.net | Date: | Sun, 25 Oct 2020 13:15:21 +0000 |
| Subject: | note 72957 deleted from function.call-user-method by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215640@lists.php.net to get a copy of this message | ||
Note Submitter: j dot h at h-elektro dot de
----
It does not work to use Pointers as Arguments:
<?php
class abc{
function func(&$argument) {
$argument="It works";
}
}
$obj=new abc;
$argument_to_be_changed="No it doesnt";
call_user_method("func", $obj, $argument_to_be_changed);
echo "Result".$argument_to_be_changed;
?>
The result is: "No it doesnt".
Regards
der Jan