Last active
December 17, 2015 03:59
-
-
Save uberEllis/5547621 to your computer and use it in GitHub Desktop.
A doodle in PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
xsyn++
This is very cool though