The PHP hypot() function calculates the hypotenuse of a right-angle triangle.

				
					<?php
echo hypot(1, 2);
?>
				
			

Syntax

				
					hypot(x,y)
				
			

Parameters

ParameterDescription
xSpecifies the length of the first side (required)
ySpecifies the length of the second side (required)