3v4l.org

run code in 300+ PHP versions simultaneously
<?php function percentToDegrees($percent) { $percent = filter_var($percent, FILTER_VALIDATE_INT, array('options' => array('min_range' => 0, 'max_range' => 100))); if ($percent === false) { return false; } 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 git.master, git.master_jit, rfc.property-hooks
float(0) float(45) float(90) float(135) float(180)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
44.1 ms | 401 KiB | 8 Q