3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function percentToDegrees($percent) { $percent = intval($percent); return round(($percent / 100) * 180); } var_dump(percentToDegrees(0)); var_dump(percentToDegrees(25)); var_dump(percentToDegrees(50)); var_dump(percentToDegrees(75)); var_dump(percentToDegrees(100));
Output for 4.3.0 - 7.2.0
float(0) float(45) float(90) float(135) float(180)