Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<ReflectionParameter::isDefaultValueConstantReflectionParameter::isPassedByReference>
^ReflectionParameterLast updated: Mon, 26 Oct 2026

ReflectionParameter::isOptional

(PHP 5 >= 5.0.3, PHP 7, PHP 8)

ReflectionParameter::isOptional — Checks if optional

Description

public function ReflectionParameter::isOptional(): bool

Checks if the parameter is optional.

Parameters

This function has no parameters.

Return Values

true if the parameter is optional, otherwise false

See Also


<ReflectionParameter::isDefaultValueConstantReflectionParameter::isPassedByReference>
^ReflectionParameterLast updated: Mon, 26 Oct 2026