Created
December 3, 2014 14:27
-
-
Save 7kaji/a4c616499c34739c8b65 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 main() { | |
$args = func_get_args(); | |
return call_user_func_array('choice', $args) . "\n"; | |
} | |
function choice() { | |
$args = func_get_args(); | |
if(count($args) == 0) { | |
return "なにも悩んでることないみたいですね!"; | |
} | |
return "厳選な抽選の結果、「" . $args[array_rand($args)] . "」に決まりました。"; | |
} | |
echo main("hoge", "fuga"); | |
echo main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment