You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am solving a SECOND DEGREE EQUATION in PHP, I used several conditions to be able to manage all the possibilities of results.
The issue that the equation is provided in string so the coefficients are interpreted by the rgex function as a string as a result when I convert the coefficients to integer the conversion will be equal to 0 and not 1.
Is it possible to manage this condition ?
I would like to find the best approach or regex function to solve this issue
here is my code : https://onlinephp.io/c/52832
Thanks in advance
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am solving a SECOND DEGREE EQUATION in PHP, I used several conditions to be able to manage all the possibilities of results.
The issue that the equation is provided in string so the coefficients are interpreted by the rgex function as a string as a result when I convert the coefficients to integer the conversion will be equal to 0 and not 1.
Is it possible to manage this condition ?
I would like to find the best approach or regex function to solve this issue
here is my code :
https://onlinephp.io/c/52832
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions