Lets say you have method defined
function read_me( a,b,c=1,d,e=2,f=3){}
then reading argument "c" to be optional, it will actually give you false (or nothing at all). This is probably a bug that counts number of required arguments, assuming you have put all optional to the end.
ReflectionParameter::isOptional
(PHP 5 >= 5.0.3)
ReflectionParameter::isOptional — Checks if optional
Descripción
public bool ReflectionParameter::isOptional
( void
)
Checks if the parameter is optional.
Parámetros
Esta función no tiene parámetros.
Valores devueltos
TRUE if the parameter is optional, otherwise FALSE
artkurapov at gmail dot com
09-Feb-2010 03:26
