Given a HUGE number check if it 's a power of two. | Function to check whether a number is power of 2 or not ; Driver Code
< ? php function ispowerof2 ( $ num ) { if ( ( $ num & ( $ num - 1 ) ) == 0 ) return 1 ; return 0 ; } $ num = 549755813888 ; echo ispowerof2 ( $ num ) ; ? >