Skip to content

Instantly share code, notes, and snippets.

@icemancast
Last active August 29, 2015 14:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icemancast/5afc40748c46d1217cfd to your computer and use it in GitHub Desktop.
Save icemancast/5afc40748c46d1217cfd to your computer and use it in GitHub Desktop.
Elaine Likes Me Alot
<?php
// Remember the class is aware.
// ==========================
function askElaine() {
echo 'Do you like me yes || no!' . PHP_EOL;
}
function doesLikeMe() {
echo 'I just want to be friends!' . PHP_EOL;
}
function passNoteToElaine() {
askElaine();
doesLikeMe();
}
passNoteToElaine();
// Happily Ever After
// ==========================
function askElaine() {
return 'Do you like me yes || no!' . PHP_EOL;
}
function doesLikeMe() {
return true;
}
function passNoteToElaine() {
echo askElaine();
if(doesLikeMe())
{
return 'Want to go around' . PHP_EOL;
}
}
echo passNoteToElaine();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment