Skip to content

Instantly share code, notes, and snippets.

@fajarwz
Created February 21, 2022 15:55
Show Gist options
  • Save fajarwz/78e5a1767f365fbd0e88e568027df991 to your computer and use it in GitHub Desktop.
Save fajarwz/78e5a1767f365fbd0e88e568027df991 to your computer and use it in GitHub Desktop.
get the opposite number of a dice
<?php
// dice problem
function get_the_opposite($n) {
return 7 - $n;
}
echo get_the_opposite(3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment