3v4l.org

run code in 300+ PHP versions simultaneously
<?php function convertOld($input) { $oldMin = 0; $oldMax = 1; $newMin = 127; $newMax = 0; return ceil(((($input- $oldMin) * ($newMax - $newMin)) / ($oldMax - $oldMin)) + $newMin); } function convertNew($input) { $range_input = range(1, 0, 1/127); $range_output = range(0, 127); foreach ($range_input as $key => $value) { if ($value <= $input) { return $range_output[$key]; } } return 127; } foreach (range(0,1,1/1000) as $input) { echo (convertOld($input) != convertNew($input)) ? "WARNING $input mismatch\n" : ""; }
Output for git.master, git.master_jit, rfc.property-hooks

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.24 ms | 401 KiB | 8 Q