[solved] calc element error on php 7.0

merlino68

Member
This calc in php 5.6 work , in php 7.0 the page dont work and the error is : syntax error, unexpected ')'

$m= 495/(1.10938-(0.0008267*({tm_test___Plica_coscia}+{tm_test___Plica_pettorale}+{tm_test___Plica_addominale}))+(0.0000016*({tm_test___Plica_coscia}+{tm_test___Plica_pettorale}+{tm_test___Plica_addominale}))-(0.0002574*{tm_test___eta_allen}))-450;


$f= 495/(1.0994921-(0.0009929*({tm_test___Plica_coscia}+{tm_test___Plica_pettorale}+{tm_test___Plica_addominale}))+(0.0000023*({tm_test___Plica_coscia}+{tm_test___Plica_pettorale}+{tm_test___Plica_addominale}))-(0.0001392*{tm_test___eta_allen}))-450;

if ((int)'{tm_test___sesso_allen}'==Maschio) {$spoints = $m;}
else
if ((int)'{tm_test___sesso_allen}'==Femmina) {$spoints = $f;}
else
$spoints = "ND";
return $spoints;
 
Always quote placeholders: '{xxx}'. Otherwise in case of empty fields your code will break.
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top