PHP program to check if k - th bit of a given number is set or not using right shift operator .
< ? php function isKthBitSet ( $ n , $ k ) { if ( ( $ n >> ( $ k - 1 ) ) & 1 ) echo " SET " ; else echo " NOT ▁ SET " ; }