PHP:如何知道参数是否通过引用传递?

Consider the following code:

class myclass
{
  function __construct(&$arg1, &$arg2)
  {
    echo $arg1;
    echo $arg2;
  }
}

How do I know that constructor above has arguments passed by reference through code?

Edit:

I am looking for detecting of they are passed by reference programatically something like this:

   is_passed_by_ref($arg1, etc);

As the arguments are declared as "passed by reference" (because of the & in the declaration of your method), they just... are.

There is no "are the arguments passed by reference ?" : as you declared your method was receiving its parameters by reference, they are passed by reference.