php - How exactly is this function a call-by-reference function?

294

I get this warning message:

PHP Notice:  Only variables should be assigned by reference in /home/sophia/gitter/project/rational-office-2019/tmp/zog.php on line 16

What is in line this 'zog.php' file?

$the_mainrdn = &obtaino($zogcn,'mainrdn');

So, you would think from this warning that the obtaino function would have a second argument that is supposed to be called by reference - but here is the start and end of the function in question:

function obtaino ( $the_xcont, $the_clnom )
{
  $awesome_dom = new DOMDocument();
  $awesome_dom->loadHTML($the_xcont);
  -- <some more stuff here> --
  return $awesome_bdv;
}

as you can see, there is no & symbol before the $the_clnom at the opening of the function - so I do not see how this is call by reference.

So what am I missing?

People are also looking for solutions to the problem: php - Why isn't my code displaying comments and replies properly?

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.