Program to Convert Km / hr to miles / hr and vice versa | Function to convert kmph to mph ; Function to convert mph to kmph ; Driver Code
< ? php function kmphTOmph ( $ kmph ) { return 0.6214 * $ kmph ; } function mphTOkmph ( $ mph ) { return $ mph * 1.60934 ; } $ kmph = 150 ; $ mph = 100 ; echo " speed ▁ in ▁ mph ▁ is ▁ " , kmphTOmph ( $ kmph ) , " STRNEWLINE " ; echo " speed ▁ in ▁ kmph ▁ is ▁ " , mphTOkmph ( $ mph ) ; ? >