Shortest distance from the centre of a circle to a chord | Function to find the shortest distance ; Driver code
< ? php function shortdis ( $ r , $ d ) { echo " The ▁ shortest ▁ distance ▁ " ; echo " from ▁ the ▁ chord ▁ to ▁ centre ▁ " ; echo sqrt ( ( $ r * $ r ) - ( ( $ d * $ d ) / 4 ) ) ; } $ r = 4 ; $ d = 3 ; shortdis ( $ r , $ d ) ; ? >