Last active
September 27, 2019 03:27
-
-
Save lenivene/316dc81a4f63f3653a9a83bc578ff46e to your computer and use it in GitHub Desktop.
Get boolean false or true in value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if( ! defined( 'FILTER_VALIDATE_BOOLEAN' ) ){ | |
define( 'FILTER_VALIDATE_BOOLEAN', 258 ); | |
} | |
$db_value = 1; | |
$bool_value = filter_var( $db_value, FILTER_VALIDATE_BOOLEAN ); | |
var_dump( $bool_value ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment