PHP Booval()

PHP Booval()


The boolval() function is an inbuilt function in PHP which gives the Boolean value for a given expression.

Syntax:

boolean boolval( $expr )

Parameter: This function accepts only one parameter as shown in above syntax and described below:

  • $expr: The expression or the scalar which you want to change into boolean value. It can be a string type, integer type and etc.