3v4l.org

run code in 300+ PHP versions simultaneously
<?php function positionX($alpha, $r) { $x = $r * cos(deg2rad($alpha)); // X coordinates return $x; } function positionY($alpha, $r){ $y = $r * sin(deg2rad($alpha)); // Y coordinates return $y; } echo round(positionX(0, 123)) . ', ' .round(positionY(0, 123)) . "\n"; echo round(positionX(45, 123)) . ', ' .round(positionY(45, 123)) . "\n"; echo round(positionX(90, 123)) . ', ' .round(positionY(90, 123)) . "\n"; echo round(positionX(135, 123)) . ', ' .round(positionY(135, 123)) . "\n"; echo round(positionX(180, 123)) . ', ' .round(positionY(180, 123)) . "\n"; echo round(positionX(22.5, 123)) . ', ' .round(positionY(22.5, 123)) . "\n";
Output for git.master, git.master_jit, rfc.property-hooks
123, 0 87, 87 0, 123 -87, 87 -123, 0 114, 47

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:
50.07 ms | 401 KiB | 8 Q