In php, data type of a variable need to be explicitly specified. The data type is assigned depending on the context.
$x = 1;
Automatically assigns “INTEGER” data type.
The data type can be overirideen by explicaitally specifying the type:
$y = (float) $x;
Settype() function can also be used.
Posted in: PHP