Efficiently check whether n is a multiple of 4 or not | function to check whether ' n ' is a multiple of 4 or not ; if true , then ' n ' is a multiple of 4 ; else ' n ' is not a multiple of 4 ; Driver Code
< ? php function isAMultipleOf4 ( $ n ) { if ( ( $ n & 3 ) == 0 ) return " Yes " ; return " No " ; } $ n = 16 ; echo isAMultipleOf4 ( $ n ) ; ? >