Multiples of 4 ( An Interesting Method ) | Returns true if n is a multiple of 4. ; Printing multiples of 4 using above method
< ? php function isMultipleOf4 ( $ n ) { if ( $ n == 0 ) return true ; return ( ( ( $ n >> 2 ) << 2 ) == $ n ) ; } for ( $ n = 0 ; $ n <= 42 ; $ n ++ ) if ( isMultipleOf4 ( $ n ) ) echo $ n , " ▁ " ; ? >