Last active
January 4, 2018 01:44
-
-
Save bryanrsebastian/f4a353c5c8c31165f072b6da4e5ce82a to your computer and use it in GitHub Desktop.
This file contains 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 | |
/** | |
* Global checker | |
* @param string/array $var the function will check this variable | |
* @return boolean true if not empty, not null, is set, and not equal to ''. | |
*/ | |
if ( ! function_exists( 'checker' ) ) { | |
function checker( $var ) { | |
return ( $var && $var != '' && ! empty( $var ) && ! is_null( $var ) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment