finding explicit float-casts will not help you - in php the variable is considered as what it is used for. small example:
$mystring = "123.45"; //mystring is a string here $myvalue = $mystring * 4; // mystring is a float here // and there no explicit float-cast
as you can see: updating / fixing your php installation is the only way to save a dead server.
EDIT: to your comment:
swimming really hard. even simple numbers, such as 0.7 or 0.8, cannot be stored exactly, and therefore it may happen that you, after some calculations, 0.899999999789 ... with even more shit, this is just a question time until you get the problem.
as an example (and if you are a Windows user):
- open the calculator window
- calculate sqare root of 4 (should be 2)
- subtracting 2 from the result (should be 0, but ... woooow;))
this error is in the windows calculator since ... ever - and it shows that even large companies may not use float, but the calculator does not kill your system - if such an error can kill your system (for example, this is php-bug) You will have to update / fix, do not show.
source share