<?php
class Test {
	public function Test1(
		?Category $category = null,
        ?string $name = null,
        ?string $description = null,
        ?int $price = null,
        ?bool $active = null) {  }
}

//get the information about a specific method.
$rm = new ReflectionMethod('Test', 'Test1');

//get all parameter names and parameter types of the method.
foreach ($rm->getParameters() as $parameter) {
	echo 'Name: '.$parameter->getName().' - Type: '.$parameter->getType()."\n";
}