PHP: Convert Radians to Degrees and Degrees to Radians

Radians and degrees are 2 different quantitative approaches to denote an angle, in PHP, you can convert a radian value to a degree by the function rad2reg() and a degree value to radian by the function deg2rad():

$degrees = rad2deg('3.1416'); // $degrees = 180
$radians = deg2rad(180); // $radians = 3.14159265359
Scroll to Top