1 function php_getSolutionOVQE($a,$b,$c=0){ 2 $x1=0; 3 $x2=0; 4 $detal=0; 5 if($a==0 && $b==0){ 6 return false; 7 } 8 if($a==0){ 9 $x1 = -1 * ($c/$b); 10 return [$x1]; 11 } 12 $detal = pow($b,2) - 4*$a*$c; 13 if($detal == 0){ 14 $x1 = (-1*$b + sqrt($detal)) / (2 * $a); 15 return [$x1]; 16 }else if($detal > 0){ 17 $x1 = (-1*$b + sqrt($detal)) / (2 * $a); 18 $x2 = (-1*$b - sqrt($detal)) / (2 * $a); 19 return [$x1,$x2]; 20 } 21 return false; 22 }