Closed
Description
The method signature designates the options
parameter as optional with the constant IntlChar::FOLD_CASE_DEFAULT
as default. I am expecting the string(1) "i"
when calling var_dump(IntlChar::foldCase("I")
, but I get an error:
Fatal error: Uncaught ArgumentCountError: IntlChar::foldCase() expects exactly 2 arguments, 1 given
<?php
$method = new ReflectionMethod('IntlChar', 'foldCase');
$options = $method->getParameters()[1];
// All good
var_dump(
"Param name: " . $options->name,
"Is optional: " . $options->isOptional(),
"Type: " . $options->getType(),
"Is default available: " . $options->isDefaultValueAvailable(),
"Is default value constant: ". $options->isDefaultValueConstant(),
"Default const name: " . $options->getDefaultValueConstantName(),
"Default value: " . $options->getDefaultValue(),
);
// But fatal error
var_dump(IntlChar::foldCase('I'));