Larger of a ^ b or b ^ a ( a raised to power b or b raised to power a ) | Function to find the greater value ; Driver code
< ? php function findGreater ( $ a , $ b ) { $ x = ( double ) $ a * ( double ) ( log ( ( double ) ( $ b ) ) ) ; $ y = ( double ) $ b * ( double ) ( log ( ( double ) ( $ a ) ) ) ; if ( $ y > $ x ) { echo " a ^ b ▁ is ▁ greater " , " STRNEWLINE " ; } else if ( $ y < $ x ) { echo " b ^ a ▁ is ▁ greater " , " STRNEWLINE " ; } else { echo " Both ▁ are ▁ equal " , " STRNEWLINE " ; } } $ a = 3 ; $ b = 5 ; $ c = 2 ; $ d = 4 ; findGreater ( $ a , $ b ) ; findGreater ( $ c , $ d ) ; ? >