Modify a binary array to Bitwise AND of all elements as 1 | Function to check if it is possible or not ; Driver code
< ? php function check ( $ a , $ n ) { for ( $ i = 0 ; $ i < $ n ; $ i ++ ) if ( $ a [ $ i ] ) return true ; return false ; } $ a = array ( 0 , 1 , 0 , 1 ) ; $ n = sizeof ( $ a ) ; if ( check ( $ a , $ n ) ) echo " YES STRNEWLINE " ; else echo " NO STRNEWLINE " ; ? >