<?php
function get_params() {
$params = array();
if (isset($_GET)) {
foreach ($_GET as $key => $value) {
$params[] = $value;
}
}
return $params;
}
$action = function ($arg1 = null, $arg2 = null) {
var_dump($arg1);
var_dump($arg2);
};
call_user_func_array($action, get_params());