3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=0; $b=0; $c=0; $determinant = $b * $b - 4 * ($a * $c) ; // D = b² - 4ac echo "d = $determinant\n"; // x1 = (-b + Rac(D)) / 2a et x2 = (-b – Rac(D)) /2a if ($determinant > 0){ $x1 = (-$b + sqrt($determinant))/ 2 * $a; $x2 = (-$b - sqrt($determinant))/ 2 * $a; echo "x1 = $x1\n"; echo "x2 = $x2\n";} if ($determinant = 0){ $x1 = $x2 = -$b/ (2 * $a); echo "x1 = $x1\n"; echo "x2 = $x2\n"; }
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
d = 0

preferences:
237.31 ms | 404 KiB | 330 Q