Created
August 17, 2015 00:58
-
-
Save AlexH-HankIT/5f5cfa63143b574ffb2d to your computer and use it in GitHub Desktop.
empty function for multiple values
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
| /** | |
| * | |
| * empty() function for multiple values | |
| * | |
| * @link http://stackoverflow.com/questions/4993104/using-ifempty-with-multiple-variables-not-in-an-array | |
| * @return bool | |
| * | |
| */ | |
| public function mempty() { | |
| foreach (func_get_args() as $arg) | |
| if (empty($arg)) | |
| continue; | |
| else | |
| return false; | |
| return true; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment