text: Arc length from given Angle | function to calculate arc length ; Driver Code
code: < ? php function arcLength ( $ diameter , $ angle ) { $ pi = 22.0 / 7.0 ; $ arc ; if ( $ angle >= 360 ) { echo " Angle ▁ cannot " , " ▁ be ▁ formed " ; return 0 ; } else { $ arc = ( $ pi * $ diameter ) * ( $ angle / 360.0 ) ; return $ arc ; } } $ diameter = 25.0 ; $ angle = 45.0 ; $ arc_len = arcLength ( $ diameter , $ angle ) ; echo ( $ arc_len ) ; ? >