-2

&& is clear in PHP which means AND. But how about just &?

For example, what does $error['type'] & E_FATAL mean?

Please help me since I am stuck. The code is here:

function shut(){

   $error = error_get_last();

   if($error && ($error['type'] & E_FATAL)){
       handler($error['type'], $error['message'], $error['file'], $error['line']);
   }

}
halfer
  • 18,701
  • 13
  • 79
  • 158
xnote
  • 89
  • 2
  • 9

2 Answers2

3

It's the bitwise AND operator. PHP manual.

Also, read this: Reference - What does this symbol mean in PHP?

Community
  • 1
  • 1
Mark
  • 1,306
  • 9
  • 15
0

'&' is Bitwise And operator. use this link to find more info on this http://www.php.net/manual/en/language.operators.bitwise.php

Adarsh Nahar
  • 319
  • 3
  • 10