boolval

PHP 5 >= 5.5.0, PHP 7, PHP 8
boolval - Get the boolean value of a variable
Manual
Code Examples

Example #1 boolval examples

Result: 0: false 42: true 0.0: false 4.2: true "": false "string": true "0": false "1": true [1, 2]: true []: false stdClass: true
PHP Version:


Function boolval:

Variable handling Functions

Most used PHP functions