Last active
February 20, 2017 02:32
-
-
Save ftkro/731e0c017345ecc73643d1dd5b78a110 to your computer and use it in GitHub Desktop.
汚いコードだなぁ…
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 | |
//Eval is Evil so 汚ねぇコードだなぁ… | |
function Execute($function,...$data) { | |
if(count($data) == 0) { | |
$function($data[0]); | |
} | |
if(count($data) == 1) { | |
$function($data[0],$data[1]); | |
} | |
if(count($data) == 2) { | |
$function($data[0],$data[1],$data[2]); | |
} | |
if(count($data) == 3) { | |
$function($data[0],$data[1],$data[2],$data[3]); | |
} | |
if(count($data) == 4) { | |
$function($data[0],$data[1],$data[2],$data[3],$data[4]); | |
} | |
if(count($data) == 5) { | |
$function($data[0],$data[1],$data[2],$data[3],$data[4],$data[5]); | |
} | |
if(count($data) == 6) { | |
$function($data[0],$data[1],$data[2],$data[3],$data[4],$data[5],$data[6]); | |
} | |
if(count($data) == 7) { | |
$function($data[0],$data[1],$data[2],$data[3],$data[4],$data[5],$data[6],$data[7]); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment