Boolean is the simplest data type. It’s Like a switch that has only two states ON means true or 1 and OFF means false or 0.
Booleans is frequently used in conditional testing in most of the cases.
php code Syntax :
learn php Sample Code : a simple php program
php examples Code Explanation :
In PHP 7 and generic php language, $true variable is declared to hold value=true.
In PHP 7 and generic php language, $false variable is declared to hold value=false.
var_dump($true,$false) function returns the data type and value in terms of boolean. ($true,$false) variables will display boolean output as shown below.
php tutorials Sample Output :
var_dump() function returns the data type with its value in terms of Boolean as shown in the browser window.