Skip to content

Instantly share code, notes, and snippets.

@uberEllis
Last active December 17, 2015 03:59
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 uberEllis/5547621 to your computer and use it in GitHub Desktop.
Save uberEllis/5547621 to your computer and use it in GitHub Desktop.
A doodle in PHP
<?php
function word_live_as_one($imagination) {
global $world;
foreach ($imagination as $thought) {
switch ($thought) {
case 'heaven':
case 'hell':
case 'countries':
case 'possessions':
$dreamer = FALSE;
break;
default:
$dreamer = TRUE;
}
if (in_array($thought, $world->things_to_die_for) || (in_array($thought, $world->things_to_kill_for)) {
$dreamer = FALSE;
}
if (in_array($thought, $world->need_for_greed) || (in_array($thought, $world->need_for_hunger)) {
$dreamer = FALSE;
}
}
if ($dreamer == 'FALSE') {
echo "I hope some day you'll join us";
}
else {
$imagination = array(
'people living for today',
'people living life in peace',
'people sharing all the world',
);
}
return $imagination;
}
?>
@perceptum
Copy link

xsyn++

This is very cool though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment