Degrees and radians are different metric means to gauge an angle. They are mutually convertible in PHP. Simply use the PHP degrees to radians function deg2rad() and PHP radians to degrees function rad2deg().
$degrees = 180;
$radians = deg2rad($degrees); // 3.1416
$degrees = rad2deg($radians); // 180
Because trigonometric calculations are usually done in radians, you have to convert the degrees into radians:
$cosine = cos(deg2rad($degrees));
You should also read:
- PHP: Convert Radians to Degrees and Degrees to Radians
- PHP: Convert between Numerical Bases | Binary Number, Decimal Number, Octal Number and Hexadecimal Number Conversions
- How to convert .png, .gif, .bmp or .jpg images to .ico icons to make favicon.ico for your website?
- Google as an online advanced mathematic calculator for arithmetic calculations and big number scientific computations
- Log Walking – Walk through your website logs and be in the shoe of a visitor


Facebook
Twitter
Google Plus