Closed simongcc closed 3 years ago
Would you like to create a PR to fix it?
This isn't fixed yet? I propose to either remove the bindec function altogether from benchmark OR add an if statement like this:
alternative 1: remove the bindec function altogether
- 183: $mathFunctions = array("abs", "acos", "asin", "atan", "bindec", "floor", "exp", "sin", "tan", "is_finite", "is_nan", "sqrt");
+ 183: $mathFunctions = array("abs", "acos", "asin", "atan", "floor", "exp", "sin", "tan", "is_finite", "is_nan", "sqrt");
alternative 2: add an if statement, if $function is "bindec" then call_user_func_array($function, array(decbin($i))); else call_user_func_array($function, array($i));
- 186: call_user_func_array($function, array($i));
+ 186: if($function == "bindec") call_user_func_array($function, array(decbin($i)));
+ 187: else call_user_func_array($function, array($i));
If you approve any of the 2 above, I'll make a PR
This bug has been fixed. Please try it again.
Hi! It seems that php 7.4.x is more strict in checking arguments and function
bindec
expects 0 and 1 only string so it give the warning.( ! ) Deprecated: Invalid characters passed for attempted conversion, these have been ignored in benchmark.php on line 183