Find letter 's position in Alphabet using Bit operation | Function to calculate the position of characters ; Performing AND operation with number 31 $ ; Driver code
< ? php function positions ( $ str , $ n ) { $ a = 31 ; for ( $ i = 0 ; $ i < $ n ; $ i ++ ) { print ( ( ord ( $ str [ $ i ] ) & ( $ a ) ) . " " ) ; } } $ str = " Geeks " ; $ n = strlen ( $ str ) ; positions ( $ str , $ n ) ; ? >