'Text', 'HTMLValue' => 'HTMLFragment' ]; public function methodWithOneArgument($arg1) { return "arg1:{$arg1}"; } public function methodWithTwoArguments($arg1, $arg2) { return "arg1:{$arg1},arg2:{$arg2}"; } public function methodWithTypedArguments(...$args) { $ret = []; foreach ($args as $i => $arg) { $ret[] = "arg$i:" . json_encode($arg); } return implode(',', $ret); } public function Type($arg) { return gettype($arg) . ':' . $arg; } }