3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function delta(float $a, float $b, float $c): float { return ($b^2) - (4*$a*$c); } echo "Delta wynosi: ".delta(1,25,3) . "\n"; function msc_zerowe(float $a, float $b, float $c): float { return (-$b-sqrt(delta($a, $b, $c)))/2*$a; } echo "Miejsce zerowe wynosi: ".msc_zerowe(1, 25, 3);
based on Wpc6f
Output for hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.2.6
Delta wynosi: 15 Miejsce zerowe wynosi: -14.436491673104
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting '{' in /in/fmopv on line 3
Process exited with code 255.