Skip to content

Instantly share code, notes, and snippets.

@puiutucutu
Created December 30, 2017 06:22
Show Gist options
  • Save puiutucutu/16e5d0c29271c4ec0402ccebdcfc2d7e to your computer and use it in GitHub Desktop.
Save puiutucutu/16e5d0c29271c4ec0402ccebdcfc2d7e to your computer and use it in GitHub Desktop.
Ternary in php
<?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