3v4l.org

run code in 300+ PHP versions simultaneously
<?php function compute ($stake, $values) { $result = $stake; foreach ($values as $val) { $parts = explode('/', $val); $result *= ($parts[0] / $parts[1] + 1); } return $result; } $stake = 10; $odds = array ( '8/15', '11/2', '13/2', '7/2' ); $result = compute($stake, $odds); var_dump($result);
Output for git.master, git.master_jit, rfc.property-hooks
float(3363.7499999999995)

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