Calculates miles per hour (mph) given distance in feet and time in seconds.
mph(integer|float $distance = 0, integer|float $time = 60, bool $asString = false): string|float
distance (integer|float) : Distance traveled in feet (can include decimals).
time (integer|float) : Travel time in seconds (can include decimals). Defaults to 60 seconds (1 minute).
asString (bool) : If set to true, returns value as string with appended "mph". ^(optional)^
true
(string|float) : Returns miles per hour as a float, or a string depending on the optional boolean argument.
$fx->mph(150, 6) = 17.05 $fx->mph(45, 3, true) = 10.23 mph $fx->mph(443.21, 59.63) = 5.07
kmh
Home | CoreyFX | Formulas
There was an error while loading. Please reload this page.