There are different data types in PHP.
We can use var_dump()
to check a type and value of a variable.
$complete = true;
var_dump($complete); // bool(true)
We can use strict type to get a better quality of code and know what type is expected.
declare(strict_types=1);
function sum(float $x, float $y) {
return $x + $y
}
$sum = sum(1,2);
echo $sum; // 3
var_dump($sum); // float(3)