3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pointsNo = 190; // e.g count($coordsX) == 190; $maxPolyPoints = 120; $idxRatio = round($pointsNo/$maxPolyPoints); $idx = 0; $i = 0; while ($idx<$pointsNo){ //$newX[$i] = $coordsX[$idx]; //$newY[$i] = $coordsY[$idx]; $idx += $idxRatio; $i++; } echo "existing: ".$i; echo "<br>"; $idxRatio = $pointsNo/$maxPolyPoints; $idx = 0; $i = 0; while (ceil($idx)<$pointsNo){ //$newX[$i] = $coordsX[round($idx)]; //$newY[$i] = $coordsY[round($idx)]; $idx += $idxRatio; $i++; } echo "improved: ".$i;
Output for git.master, git.master_jit, rfc.property-hooks
existing: 95<br>improved: 120

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