3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 1110; $b = 370; $c = 6171.6; $h = 71.1; $i = -50; // undef $k = 0; // undef $l = 0; // undef $step = 0.001; // Auflösung für $i $i_max = 100; // um keine Endlosschleife zu produzieren $epsilon = 0.001; // Fehlertoleranz $found = false; do { $k = 0.9942; $l = 0.998670248976177; $tmp = (556 / ($h / (545.223880597015 / 1000 * $k * $l))); $found = (abs($i - $tmp) <= $epsilon); if (!$found) { $i += $step; } if ($i > $i_max) { throw new Exception('Unable to calculate $i'); } } while (!$found); $g = ceil($h / (545.223880597015 / 1000 * $l * $k)); //$i = 556 / $g; // ??? $i haben wir schon $j = $g * $b / 1000 * $a / 100 * 1; $e = ($i - $b / 1000) * $a / 100; $f = $i * $a / 100; $d = $c - $j; foreach (range('a', 'l') as $var) { echo $var . ' = '; var_dump($$var); echo '<br />'; } ?>
Output for 5.0.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
a = int(1110) <br />b = int(370) <br />c = float(6171.6) <br />d = float(5629.476) <br />e = float(42.879299999711) <br />f = float(46.986299999711) <br />g = float(132) <br />h = float(71.1) <br />i = float(4.2329999999739) <br />j = float(542.124) <br />k = float(0.9942) <br />l = float(0.99867024897618) <br />
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_NEW in /in/ghBPP on line 29
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_NEW in /in/ghBPP on line 29
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/ghBPP on line 29
Process exited with code 255.