Number of Digits in a ^ b | function to calculate number of digits in a ^ b ; Driver Code
< ? php function no_of_digit ( $ a , $ b ) { return ( ( int ) ( $ b * log10 ( $ a ) ) + 1 ) ; } $ a = 2 ; $ b = 100 ; echo ( " no . ▁ of ▁ digits ▁ = ▁ " . no_of_digit ( $ a , $ b ) ) ; ? >