PHP Error



This content originally appeared on DEV Community and was authored by Falak

$valOne variable has string type value and $valTwo variable has original value. I calculated them and did not find error as I excepted.

$valOne = "100"; //defined variable as string.
$valTwo = 6;    //defined variable as value.
$calOfVals = $valOne / $valTwo; //applied division.
echo $calOfVals; //output: 16.666666666667.


This content originally appeared on DEV Community and was authored by Falak