Skip to content

Instantly share code, notes, and snippets.

@jhannah
Last active February 17, 2017 15:33
Show Gist options
  • Save jhannah/acbc8b5ed792123d00eadb8671aae115 to your computer and use it in GitHub Desktop.
Save jhannah/acbc8b5ed792123d00eadb8671aae115 to your computer and use it in GitHub Desktop.
BEFORE
<?php
if (its_this() || its_that()) {
// do nothing
} else {
do_something();
}
?>
AFTER Jay's preference in Perl syntax:
unless (its_this() || its_that()) {
do_something();
}
AFTER Jay's short Perl version:
(its_this() || its_that()) ? : do_something();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment