Program to calculate distance between two points | Function to calculate distance ; Calculating distance ; Driver Code
< ? php function distance ( $ x1 , $ y1 , $ x2 , $ y2 ) { return sqrt ( pow ( $ x2 - $ x1 , 2 ) + pow ( $ y2 - $ y1 , 2 ) * 1.0 ) ; } echo ( distance ( 3 , 4 , 4 , 3 ) ) ; ? >