callback function return return($var & 1)?

前端 未结 8 2138
灰色年华
灰色年华 2020-12-05 22:07

I have read the PHP Manuel about array_filter



        
8条回答
  •  孤街浪徒
    2020-12-05 22:58

    & is bitwise "and" operator. With 1, 3, 5 (and other odd numbers) $var & 1 will result in "1", with 0, 2, 4 (and other even numbers) - in "0".

提交回复
热议问题