protected static function hasVariadic(\reflectionMethod $method) { $parameters = $method->getParameters(); if (sizeof($parameters) === 0) { return false; } return self::isVariadic(end($parameters)); }