Skip to content

Instantly share code, notes, and snippets.

@datamafia
Created August 10, 2014 18:21
Show Gist options
  • Save datamafia/389b0fab8a49275345b0 to your computer and use it in GitHub Desktop.
Save datamafia/389b0fab8a49275345b0 to your computer and use it in GitHub Desktop.
PHP order of Operations Check with Ternary
// Supports a post as an example
$a = true;
// double aka nested ternary
echo isset($a)?'Outter':isset($a)?'Inner':'Else';
// result "Inner"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment