0

In this User Contributed Note at php.net there is a function called like this:

FriendlyErrorType($errLvl & pow(2, $i))

I know that the ampersand can be used to pass an argument to a function by reference but that does not seem to be what is happening here although maybe it is and I can't understand it.

What is the ampersand doing in this case?

user3425506
  • 1,285
  • 1
  • 16
  • 26
  • 6
    See https://www.php.net/manual/en/language.operators.bitwise.php – Clive Feb 18 '23 at 00:05
  • 1
    In case it is not obvious, it is doing an AND operation between $errLv1 variable and the result of the function pow. It is not passing by reference as pow is a function, not a variable. It does not have a $ in front of it. – Rohit Gupta Feb 20 '23 at 13:34

0 Answers0