Function to calculate and return the power of any given number
< ? php function power ( $ num , $ n ) { if ( $ n == 0 ) return 1 ; else if ( $ n % 2 == 0 ) return power ( $ num , ( int ) ( $ n / 2 ) ) * power ( $ num , ( int ) ( $ n / 2 ) ) ; else return $ num * power ( $ num , ( int ) ( $ n / 2 ) ) * power ( $ num , ( int ) ( $ n / 2 ) ) ; }