Last active
June 16, 2021 10:47
-
-
Save LasseRafn/68d96e574148996c03cb535ff5d93bc1 to your computer and use it in GitHub Desktop.
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 ( ! function_exists( 'bool' ) ) { | |
function bool( $value, $default = false ): bool { | |
return filter_var( $value ?? $default, FILTER_VALIDATE_BOOLEAN ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment