Created
December 30, 2017 06:22
-
-
Save puiutucutu/16e5d0c29271c4ec0402ccebdcfc2d7e to your computer and use it in GitHub Desktop.
Ternary in php
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 | |
function validateInput($input) | |
{ | |
return ( | |
! $this->is_array($input) or | |
! $this->someValidationMethod($input) | |
) ? true : false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment