ReflectionParameter::isOptional

( excerpt from http://php.net/manual/en/reflectionparameter.isoptional.php )

public function isOptional(): bool;

Checks if the parameter is optional.

Returns

  • bool - TRUE if the parameter is optional, otherwise FALSE