Program to calculate distance between two points in 3 D | function to print distance ; Driver Code ; function call for distance
< ? php function distance ( $ x1 , $ y1 , $ z1 , $ x2 , $ y2 , $ z2 ) { $ d = sqrt ( pow ( $ x2 - $ x1 , 2 ) + pow ( $ y2 - $ y1 , 2 ) + pow ( $ z2 - $ z1 , 2 ) * 1.0 ) ; echo " Distance ▁ is ▁ " . $ d ; } $ x1 = 2 ; $ y1 = -5 ; $ z1 = 7 ; $ x2 = 3 ; $ y2 = 4 ; $ z2 = 5 ; distance ( $ x1 , $ y1 , $ z1 , $ x2 , $ y2 , $ z2 ) ; ? >