3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php header/("content-type:text/html;chartset=utf-8"); $a=2; $b=5; $c=3; $D=$b*$b - 4*$a*$c; if ($D>0){ $x1= (-$b + sqrt($D)) / 2*$a; $x2= (-$b - sqrt($D)) / 2*$a; echo $x1; echo $x2; } else if ($D==0){ $x1 = $x2 = -$b / 2*$a; echo $x1; echo $x2; }
based on Sqafn
Output for 7.2.0
Warning: Use of undefined constant header - assumed 'header' (this will throw an Error in a future version of PHP) in /in/aRhVo on line 3 Warning: A non-numeric value encountered in /in/aRhVo on line 3 Warning: A non-numeric value encountered in /in/aRhVo on line 3 Warning: Division by zero in /in/aRhVo on line 3 -4-6
Output for 7.1.0 - 7.1.10
Notice: Use of undefined constant header - assumed 'header' in /in/aRhVo on line 3 Warning: A non-numeric value encountered in /in/aRhVo on line 3 Warning: A non-numeric value encountered in /in/aRhVo on line 3 Warning: Division by zero in /in/aRhVo on line 3 -4-6
Output for 5.3.20 - 7.0.20
Notice: Use of undefined constant header - assumed 'header' in /in/aRhVo on line 3 Warning: Division by zero in /in/aRhVo on line 3 -4-6